ProjectEuler is renamed to project_euler
This commit is contained in:
71
project_euler/pe/p001.html
Normal file
71
project_euler/pe/p001.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 1 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=3dbbe"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Multiples of 3 and 5</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 1</h3><span style="width:300px;color:#666;">Published on Friday, 5th October 2001, 06:00 pm; Solved by 320101</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.</p>
|
||||
<p>Find the sum of all the multiples of 3 or 5 below 1000.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p002.html
Normal file
74
project_euler/pe/p002.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 2 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=832ea"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Even Fibonacci numbers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 2</h3><span style="width:300px;color:#666;">Published on Friday, 19th October 2001, 06:00 pm; Solved by 264221</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:</p>
|
||||
<p style="text-align:center;">1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...</p>
|
||||
<p>By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.</p>
|
||||
<!--
|
||||
Note: This problem has been changed recently, please check that you are using the right parameters.
|
||||
-->
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p003.html
Normal file
74
project_euler/pe/p003.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 3 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=8cb68"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Largest prime factor</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 3</h3><span style="width:300px;color:#666;">Published on Friday, 2nd November 2001, 06:00 pm; Solved by 192335</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The prime factors of 13195 are 5, 7, 13 and 29.</p>
|
||||
<p>What is the largest prime factor of the number 600851475143 ?</p>
|
||||
<!--
|
||||
Note: This problem has been changed recently, please check that you are using the right number.
|
||||
-->
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p004.html
Normal file
72
project_euler/pe/p004.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 4 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=ecee9"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Largest palindrome product</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 4</h3><span style="width:300px;color:#666;">Published on Friday, 16th November 2001, 06:00 pm; Solved by 175872</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 99.</p>
|
||||
<p>Find the largest palindrome made from the product of two 3-digit numbers.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
71
project_euler/pe/p005.html
Normal file
71
project_euler/pe/p005.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 5 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=f9506"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Smallest multiple</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 5</h3><span style="width:300px;color:#666;">Published on Friday, 30th November 2001, 06:00 pm; Solved by 190640</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.</p>
|
||||
<p>What is the smallest positive number that is <dfn title="divisible with no remainder">evenly divisible</dfn> by all of the numbers from 1 to 20?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p006.html
Normal file
75
project_euler/pe/p006.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 6 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=e7871"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Sum square difference</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 6</h3><span style="width:300px;color:#666;">Published on Friday, 14th December 2001, 06:00 pm; Solved by 192387</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The sum of the squares of the first ten natural numbers is,</p>
|
||||
<div style="text-align:center">1<sup>2</sup> + 2<sup>2</sup> + ... + 10<sup>2</sup> = 385</div>
|
||||
<p>The square of the sum of the first ten natural numbers is,</p>
|
||||
<div style="text-align:center">(1 + 2 + ... + 10)<sup>2</sup> = 55<sup>2</sup> = 3025</div>
|
||||
<p>Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' /> 385 = 2640.</p>
|
||||
<p>Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
71
project_euler/pe/p007.html
Normal file
71
project_euler/pe/p007.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 7 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=91f18"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>10001st prime</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 7</h3><span style="width:300px;color:#666;">Published on Friday, 28th December 2001, 06:00 pm; Solved by 163756</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.</p>
|
||||
<p>What is the 10 001st prime number?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
93
project_euler/pe/p008.html
Normal file
93
project_euler/pe/p008.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 8 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=a5be8"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Largest product in a series</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 8</h3><span style="width:300px;color:#666;">Published on Friday, 11th January 2002, 06:00 pm; Solved by 144994</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Find the greatest product of five consecutive digits in the 1000-digit number.</p>
|
||||
<p style='font-family:courier new;font-size:10pt;text-align:center;'>
|
||||
73167176531330624919225119674426574742355349194934<br />
|
||||
96983520312774506326239578318016984801869478851843<br />
|
||||
85861560789112949495459501737958331952853208805511<br />
|
||||
12540698747158523863050715693290963295227443043557<br />
|
||||
66896648950445244523161731856403098711121722383113<br />
|
||||
62229893423380308135336276614282806444486645238749<br />
|
||||
30358907296290491560440772390713810515859307960866<br />
|
||||
70172427121883998797908792274921901699720888093776<br />
|
||||
65727333001053367881220235421809751254540594752243<br />
|
||||
52584907711670556013604839586446706324415722155397<br />
|
||||
53697817977846174064955149290862569321978468622482<br />
|
||||
83972241375657056057490261407972968652414535100474<br />
|
||||
82166370484403199890008895243450658541227588666881<br />
|
||||
16427171479924442928230863465674813919123162824586<br />
|
||||
17866458359124566529476545682848912883142607690042<br />
|
||||
24219022671055626321111109370544217506941658960408<br />
|
||||
07198403850962455444362981230987879927244284909188<br />
|
||||
84580156166097919133875499200524063689912560717606<br />
|
||||
05886116467109405077541002256983155200055935729725<br />
|
||||
71636269561882670428252483600823257530420752963450<br />
|
||||
</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p009.html
Normal file
73
project_euler/pe/p009.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 9 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=057ff"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Special Pythagorean triplet</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 9</h3><span style="width:300px;color:#666;">Published on Friday, 25th January 2002, 06:00 pm; Solved by 143985</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>A Pythagorean triplet is a set of three natural numbers, <var>a</var> <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> <var>b</var> <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> <var>c</var>, for which,</p>
|
||||
<div style="text-align:center;"> <var>a</var><sup>2</sup> + <var>b</var><sup>2</sup> = <var>c</var><sup>2</sup></div>
|
||||
<p>For example, 3<sup>2</sup> + 4<sup>2</sup> = 9 + 16 = 25 = 5<sup>2</sup>.</p>
|
||||
<p>There exists exactly one Pythagorean triplet for which <var>a</var> + <var>b</var> + <var>c</var> = 1000.<br />Find the product <var>abc</var>.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p010.html
Normal file
75
project_euler/pe/p010.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 10 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=5ed38"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Summation of primes</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 10</h3><span style="width:300px;color:#666;">Published on Friday, 8th February 2002, 06:00 pm; Solved by 131487</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.</p>
|
||||
<p>Find the sum of all the primes below two million.</p>
|
||||
<!--
|
||||
<p class="info">Note: This problem has been changed recently, please check that you are using the right parameters.</p>
|
||||
-->
|
||||
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
94
project_euler/pe/p011.html
Normal file
94
project_euler/pe/p011.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 11 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=8007e"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Largest product in a grid</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 11</h3><span style="width:300px;color:#666;">Published on Friday, 22nd February 2002, 06:00 pm; Solved by 98778</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>In the 20<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />20 grid below, four numbers along a diagonal line have been marked in red.</p>
|
||||
<p style="font-family:courier new;text-align:center;font-size:10pt;">
|
||||
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08<br />
|
||||
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00<br />
|
||||
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65<br />
|
||||
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91<br />
|
||||
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80<br />
|
||||
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50<br />
|
||||
32 98 81 28 64 23 67 10 <span style="color:#ff0000;"><b>26</b></span> 38 40 67 59 54 70 66 18 38 64 70<br />
|
||||
67 26 20 68 02 62 12 20 95 <span style="color:#ff0000;"><b>63</b></span> 94 39 63 08 40 91 66 49 94 21<br />
|
||||
24 55 58 05 66 73 99 26 97 17 <span style="color:#ff0000;"><b>78</b></span> 78 96 83 14 88 34 89 63 72<br />
|
||||
21 36 23 09 75 00 76 44 20 45 35 <span style="color:#ff0000;"><b>14</b></span> 00 61 33 97 34 31 33 95<br />
|
||||
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92<br />
|
||||
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57<br />
|
||||
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58<br />
|
||||
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40<br />
|
||||
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66<br />
|
||||
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69<br />
|
||||
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36<br />
|
||||
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16<br />
|
||||
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54<br />
|
||||
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48<br />
|
||||
</p>
|
||||
<p>The product of these numbers is 26 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 63 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 78 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 14 = 1788696.</p>
|
||||
<p>What is the greatest product of four adjacent numbers in the same direction (up, down, left, right, or diagonally) in the 20<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />20 grid?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
81
project_euler/pe/p012.html
Normal file
81
project_euler/pe/p012.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 12 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=38124"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Highly divisible triangular number</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 12</h3><span style="width:300px;color:#666;">Published on Friday, 8th March 2002, 06:00 pm; Solved by 88686</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The sequence of triangle numbers is generated by adding the natural numbers. So the 7<sup>th</sup> triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:</p>
|
||||
<p style="text-align:center;">1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...</p>
|
||||
<p>Let us list the factors of the first seven triangle numbers:</p>
|
||||
<blockquote style="font-family:courier new;"><b> 1</b>: 1<br />
|
||||
<b> 3</b>: 1,3<br />
|
||||
<b> 6</b>: 1,2,3,6<br />
|
||||
<b>10</b>: 1,2,5,10<br />
|
||||
<b>15</b>: 1,3,5,15<br />
|
||||
<b>21</b>: 1,3,7,21<br />
|
||||
<b>28</b>: 1,2,4,7,14,28</blockquote>
|
||||
<p>We can see that 28 is the first triangle number to have over five divisors.</p>
|
||||
<p>What is the value of the first triangle number to have over five hundred divisors?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
173
project_euler/pe/p013.html
Normal file
173
project_euler/pe/p013.html
Normal file
@@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 13 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=8f3f0"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Large sum</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 13</h3><span style="width:300px;color:#666;">Published on Friday, 22nd March 2002, 06:00 pm; Solved by 95597</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.</p>
|
||||
<div style='font-family:courier new;font-size:10pt;text-align:center;'>
|
||||
37107287533902102798797998220837590246510135740250<br />
|
||||
46376937677490009712648124896970078050417018260538<br />
|
||||
74324986199524741059474233309513058123726617309629<br />
|
||||
91942213363574161572522430563301811072406154908250<br />
|
||||
23067588207539346171171980310421047513778063246676<br />
|
||||
89261670696623633820136378418383684178734361726757<br />
|
||||
28112879812849979408065481931592621691275889832738<br />
|
||||
44274228917432520321923589422876796487670272189318<br />
|
||||
47451445736001306439091167216856844588711603153276<br />
|
||||
70386486105843025439939619828917593665686757934951<br />
|
||||
62176457141856560629502157223196586755079324193331<br />
|
||||
64906352462741904929101432445813822663347944758178<br />
|
||||
92575867718337217661963751590579239728245598838407<br />
|
||||
58203565325359399008402633568948830189458628227828<br />
|
||||
80181199384826282014278194139940567587151170094390<br />
|
||||
35398664372827112653829987240784473053190104293586<br />
|
||||
86515506006295864861532075273371959191420517255829<br />
|
||||
71693888707715466499115593487603532921714970056938<br />
|
||||
54370070576826684624621495650076471787294438377604<br />
|
||||
53282654108756828443191190634694037855217779295145<br />
|
||||
36123272525000296071075082563815656710885258350721<br />
|
||||
45876576172410976447339110607218265236877223636045<br />
|
||||
17423706905851860660448207621209813287860733969412<br />
|
||||
81142660418086830619328460811191061556940512689692<br />
|
||||
51934325451728388641918047049293215058642563049483<br />
|
||||
62467221648435076201727918039944693004732956340691<br />
|
||||
15732444386908125794514089057706229429197107928209<br />
|
||||
55037687525678773091862540744969844508330393682126<br />
|
||||
18336384825330154686196124348767681297534375946515<br />
|
||||
80386287592878490201521685554828717201219257766954<br />
|
||||
78182833757993103614740356856449095527097864797581<br />
|
||||
16726320100436897842553539920931837441497806860984<br />
|
||||
48403098129077791799088218795327364475675590848030<br />
|
||||
87086987551392711854517078544161852424320693150332<br />
|
||||
59959406895756536782107074926966537676326235447210<br />
|
||||
69793950679652694742597709739166693763042633987085<br />
|
||||
41052684708299085211399427365734116182760315001271<br />
|
||||
65378607361501080857009149939512557028198746004375<br />
|
||||
35829035317434717326932123578154982629742552737307<br />
|
||||
94953759765105305946966067683156574377167401875275<br />
|
||||
88902802571733229619176668713819931811048770190271<br />
|
||||
25267680276078003013678680992525463401061632866526<br />
|
||||
36270218540497705585629946580636237993140746255962<br />
|
||||
24074486908231174977792365466257246923322810917141<br />
|
||||
91430288197103288597806669760892938638285025333403<br />
|
||||
34413065578016127815921815005561868836468420090470<br />
|
||||
23053081172816430487623791969842487255036638784583<br />
|
||||
11487696932154902810424020138335124462181441773470<br />
|
||||
63783299490636259666498587618221225225512486764533<br />
|
||||
67720186971698544312419572409913959008952310058822<br />
|
||||
95548255300263520781532296796249481641953868218774<br />
|
||||
76085327132285723110424803456124867697064507995236<br />
|
||||
37774242535411291684276865538926205024910326572967<br />
|
||||
23701913275725675285653248258265463092207058596522<br />
|
||||
29798860272258331913126375147341994889534765745501<br />
|
||||
18495701454879288984856827726077713721403798879715<br />
|
||||
38298203783031473527721580348144513491373226651381<br />
|
||||
34829543829199918180278916522431027392251122869539<br />
|
||||
40957953066405232632538044100059654939159879593635<br />
|
||||
29746152185502371307642255121183693803580388584903<br />
|
||||
41698116222072977186158236678424689157993532961922<br />
|
||||
62467957194401269043877107275048102390895523597457<br />
|
||||
23189706772547915061505504953922979530901129967519<br />
|
||||
86188088225875314529584099251203829009407770775672<br />
|
||||
11306739708304724483816533873502340845647058077308<br />
|
||||
82959174767140363198008187129011875491310547126581<br />
|
||||
97623331044818386269515456334926366572897563400500<br />
|
||||
42846280183517070527831839425882145521227251250327<br />
|
||||
55121603546981200581762165212827652751691296897789<br />
|
||||
32238195734329339946437501907836945765883352399886<br />
|
||||
75506164965184775180738168837861091527357929701337<br />
|
||||
62177842752192623401942399639168044983993173312731<br />
|
||||
32924185707147349566916674687634660915035914677504<br />
|
||||
99518671430235219628894890102423325116913619626622<br />
|
||||
73267460800591547471830798392868535206946944540724<br />
|
||||
76841822524674417161514036427982273348055556214818<br />
|
||||
97142617910342598647204516893989422179826088076852<br />
|
||||
87783646182799346313767754307809363333018982642090<br />
|
||||
10848802521674670883215120185883543223812876952786<br />
|
||||
71329612474782464538636993009049310363619763878039<br />
|
||||
62184073572399794223406235393808339651327408011116<br />
|
||||
66627891981488087797941876876144230030984490851411<br />
|
||||
60661826293682836764744779239180335110989069790714<br />
|
||||
85786944089552990653640447425576083659976645795096<br />
|
||||
66024396409905389607120198219976047599490197230297<br />
|
||||
64913982680032973156037120041377903785566085089252<br />
|
||||
16730939319872750275468906903707539413042652315011<br />
|
||||
94809377245048795150954100921645863754710598436791<br />
|
||||
78639167021187492431995700641917969777599028300699<br />
|
||||
15368713711936614952811305876380278410754449733078<br />
|
||||
40789923115535562561142322423255033685442488917353<br />
|
||||
44889911501440648020369068063960672322193204149535<br />
|
||||
41503128880339536053299340368006977710650566631954<br />
|
||||
81234880673210146739058568557934581403627822703280<br />
|
||||
82616570773948327592232845941706525094512325230608<br />
|
||||
22918802058777319719839450180888072429661980811197<br />
|
||||
77158542502016545090413245809786882778948721859617<br />
|
||||
72107838435069186155435662884062257473692284509516<br />
|
||||
20849603980134001723930671666823555245252804609722<br />
|
||||
53503534226472524250874054075591789781264330331690<br />
|
||||
</div>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
77
project_euler/pe/p014.html
Normal file
77
project_euler/pe/p014.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 14 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=5f4fb"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Longest Collatz sequence</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 14</h3><span style="width:300px;color:#666;">Published on Friday, 5th April 2002, 06:00 pm; Solved by 93308</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The following iterative sequence is defined for the set of positive integers:</p>
|
||||
<p style="margin-left:50px;"><var>n</var> <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> <var>n</var>/2 (<var>n</var> is even)<br />
|
||||
<var>n</var> <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 3<var>n</var> + 1 (<var>n</var> is odd)</p>
|
||||
<p>Using the rule above and starting with 13, we generate the following sequence:</p>
|
||||
<div style="text-align:center;">13 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 40 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 20 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 10 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 5 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 16 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 8 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 4 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 1</div>
|
||||
<p>It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that all starting numbers finish at 1.</p>
|
||||
<p>Which starting number, under one million, produces the longest chain?</p>
|
||||
<p class="info"><b>NOTE:</b> Once the chain starts the terms are allowed to go above one million.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p015.html
Normal file
74
project_euler/pe/p015.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 15 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=48d53"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Lattice paths</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 15</h3><span style="width:300px;color:#666;">Published on Friday, 19th April 2002, 06:00 pm; Solved by 77420</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Starting in the top left corner of a 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.</p>
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_015.gif" alt="" />
|
||||
</div>
|
||||
<p>How many such routes are there through a 20<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />20 grid?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p016.html
Normal file
72
project_euler/pe/p016.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 16 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=4bc8a"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Power digit sum</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 16</h3><span style="width:300px;color:#666;">Published on Friday, 3rd May 2002, 06:00 pm; Solved by 99096</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>2<sup>15</sup> = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.</p>
|
||||
<p>What is the sum of the digits of the number 2<sup>1000</sup>?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p017.html
Normal file
72
project_euler/pe/p017.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 17 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=f83a5"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Number letter counts</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 17</h3><span style="width:300px;color:#666;">Published on Friday, 17th May 2002, 06:00 pm; Solved by 64233</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.</p>
|
||||
<p>If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? </p>
|
||||
<br />
|
||||
<p class="info"><b>NOTE:</b> Do not count spaces or hyphens. For example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen) contains 20 letters. The use of "and" when writing out numbers is in compliance with British usage.</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
91
project_euler/pe/p018.html
Normal file
91
project_euler/pe/p018.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 18 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=d0f0d"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Maximum path sum I</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 18</h3><span style="width:300px;color:#666;">Published on Friday, 31st May 2002, 06:00 pm; Solved by 63589</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.</p>
|
||||
<p style="text-align:center;font-family:courier new;font-size:12pt;"><span style="color:#ff0000;"><b>3</b></span><br />
|
||||
<span style="color:#ff0000;"><b>7</b></span> 4<br />
|
||||
2 <span style="color:#ff0000;"><b>4</b></span> 6<br />
|
||||
8 5 <span style="color:#ff0000;"><b>9</b></span> 3</p>
|
||||
<p>That is, 3 + 7 + 4 + 9 = 23.</p>
|
||||
<p>Find the maximum total from top to bottom of the triangle below:</p>
|
||||
<p style="text-align:center;font-family:courier new;">75<br />
|
||||
95 64<br />
|
||||
17 47 82<br />
|
||||
18 35 87 10<br />
|
||||
20 04 82 47 65<br />
|
||||
19 01 23 75 03 34<br />
|
||||
88 02 77 73 07 63 67<br />
|
||||
99 65 04 28 06 16 70 92<br />
|
||||
41 41 26 56 83 40 80 70 33<br />
|
||||
41 48 72 33 47 32 37 16 94 29<br />
|
||||
53 71 44 65 25 43 91 52 97 51 14<br />
|
||||
70 11 33 28 77 73 17 78 39 68 17 57<br />
|
||||
91 71 52 38 17 14 91 43 58 50 27 29 48<br />
|
||||
63 66 04 68 89 53 67 30 73 16 69 87 40 31<br />
|
||||
04 62 98 27 23 09 70 98 73 93 38 53 60 04 23</p>
|
||||
<p class="info"><b>NOTE:</b> As there are only 16384 routes, it is possible to solve this problem by trying every route. However, <a href="index.php?section=problems&id=67">Problem 67</a>, is the same challenge with a triangle containing one-hundred rows; it cannot be solved by brute force, and requires a clever method! ;o)</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
82
project_euler/pe/p019.html
Normal file
82
project_euler/pe/p019.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 19 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=e71d0"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Counting Sundays</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 19</h3><span style="width:300px;color:#666;">Published on Friday, 14th June 2002, 06:00 pm; Solved by 58285</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>You are given the following information, but you may prefer to do some research for yourself.</p>
|
||||
<ul>
|
||||
<li>1 Jan 1900 was a Monday.</li>
|
||||
<li>Thirty days has September,<br />
|
||||
April, June and November.<br />
|
||||
All the rest have thirty-one,<br />
|
||||
Saving February alone,<br />
|
||||
Which has twenty-eight, rain or shine.<br />
|
||||
And on leap years, twenty-nine.</li>
|
||||
<li>A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.</li>
|
||||
</ul>
|
||||
<p>How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p020.html
Normal file
72
project_euler/pe/p020.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 20 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=1c1fa"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Factorial digit sum</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 20</h3><span style="width:300px;color:#666;">Published on Friday, 21st June 2002, 06:00 pm; Solved by 92034</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p><i>n</i>! means <i>n</i> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> (<i>n</i> <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' /> 1) <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> ... <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 3 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1</p>
|
||||
<p>For example, 10! = 10 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 9 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> ... <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 3 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1 = 3628800,<br />and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.</p>
|
||||
<p>Find the sum of the digits in the number 100!</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p021.html
Normal file
72
project_euler/pe/p021.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 21 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=1eca2"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Amicable numbers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 21</h3><span style="width:300px;color:#666;">Published on Friday, 5th July 2002, 06:00 pm; Solved by 63000</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Let d(<i>n</i>) be defined as the sum of proper divisors of <i>n</i> (numbers less than <i>n</i> which divide evenly into <i>n</i>).<br />
|
||||
If d(<i>a</i>) = <i>b</i> and d(<i>b</i>) = <i>a</i>, where <i>a</i> <img src='images/symbol_ne.gif' width='11' height='10' alt='≠' border='0' style='vertical-align:middle;' /> <i>b</i>, then <i>a</i> and <i>b</i> are an amicable pair and each of <i>a</i> and <i>b</i> are called amicable numbers.</p>
|
||||
<p>For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220.</p>
|
||||
<p>Evaluate the sum of all the amicable numbers under 10000.</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p022.html
Normal file
73
project_euler/pe/p022.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 22 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=8ca13"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Names scores</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 22</h3><span style="width:300px;color:#666;">Published on Friday, 19th July 2002, 06:00 pm; Solved by 58803</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Using <a href='project/names.txt'>names.txt</a> (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score.</p>
|
||||
<p>For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 53 = 49714.</p>
|
||||
<p>What is the total of all the name scores in the file?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p023.html
Normal file
74
project_euler/pe/p023.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 23 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=7f950"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Non-abundant sums</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 23</h3><span style="width:300px;color:#666;">Published on Friday, 2nd August 2002, 06:00 pm; Solved by 43904</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number.</p>
|
||||
<p>A number <var>n</var> is called deficient if the sum of its proper divisors is less than <var>n</var> and it is called abundant if this sum exceeds <var>n</var>.</p>
|
||||
<!-- <p>A number whose proper divisors are less than the number is called deficient and a number whose proper divisors exceed the number is called abundant.</p> -->
|
||||
<p>As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.</p>
|
||||
<p>Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p024.html
Normal file
72
project_euler/pe/p024.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 24 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=745e1"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Lexicographic permutations</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 24</h3><span style="width:300px;color:#666;">Published on Friday, 16th August 2002, 06:00 pm; Solved by 51148</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are:</p>
|
||||
<p style='text-align:center;'>012 021 102 120 201 210</p>
|
||||
<p>What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
86
project_euler/pe/p025.html
Normal file
86
project_euler/pe/p025.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 25 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=3c108"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>1000-digit Fibonacci number</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 25</h3><span style="width:300px;color:#666;">Published on Friday, 30th August 2002, 06:00 pm; Solved by 69365</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The Fibonacci sequence is defined by the recurrence relation:</p>
|
||||
<blockquote>F<sub><i>n</i></sub> = F<sub><i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1</sub> + F<sub><i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />2</sub>, where F<sub>1</sub> = 1 and F<sub>2</sub> = 1.</blockquote>
|
||||
<p>Hence the first 12 terms will be:</p>
|
||||
<blockquote>F<sub>1</sub> = 1<br />
|
||||
F<sub>2</sub> = 1<br />
|
||||
F<sub>3</sub> = 2<br />
|
||||
F<sub>4</sub> = 3<br />
|
||||
F<sub>5</sub> = 5<br />
|
||||
F<sub>6</sub> = 8<br />
|
||||
F<sub>7</sub> = 13<br />
|
||||
F<sub>8</sub> = 21<br />
|
||||
F<sub>9</sub> = 34<br />
|
||||
F<sub>10</sub> = 55<br />
|
||||
F<sub>11</sub> = 89<br />
|
||||
F<sub>12</sub> = 144</blockquote>
|
||||
<p>The 12th term, F<sub>12</sub>, is the first term to contain three digits.</p>
|
||||
<p>What is the first term in the Fibonacci sequence to contain 1000 digits?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
104
project_euler/pe/p026.html
Normal file
104
project_euler/pe/p026.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 26 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=00409"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Reciprocal cycles</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 26</h3><span style="width:300px;color:#666;">Published on Friday, 13th September 2002, 06:00 pm; Solved by 36089</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are given:</p>
|
||||
<blockquote>
|
||||
<table>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>2</sub></td><td>= </td><td>0.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>3</sub></td><td>= </td><td>0.(3)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>4</sub></td><td>= </td><td>0.25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>5</sub></td><td>= </td><td>0.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>6</sub></td><td>= </td><td>0.1(6)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>7</sub></td><td>= </td><td>0.(142857)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>8</sub></td><td>= </td><td>0.125</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>9</sub></td><td>= </td><td>0.(1)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup>1</sup>/<sub>10</sub></td><td>= </td><td>0.1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</blockquote>
|
||||
<p>Where 0.1(6) means 0.166666..., and has a 1-digit recurring cycle. It can be seen that <sup>1</sup>/<sub>7</sub> has a 6-digit recurring cycle.</p>
|
||||
<p>Find the value of <i>d</i> <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> 1000 for which <sup>1</sup>/<sub><i>d</i></sub> contains the longest recurring cycle in its decimal fraction part.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
79
project_euler/pe/p027.html
Normal file
79
project_euler/pe/p027.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 27 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=7de85"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Quadratic primes</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 27</h3><span style="width:300px;color:#666;">Published on Friday, 27th September 2002, 06:00 pm; Solved by 38139</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Euler discovered the remarkable quadratic formula:</p>
|
||||
<p style='text-align:center;'><i>n</i>² + <i>n</i> + 41</p>
|
||||
<p>It turns out that the formula will produce 40 primes for the consecutive values <i>n</i> = 0 to 39. However, when <i>n</i> = 40, 40<sup>2</sup> + 40 + 41 = 40(40 + 1) + 41 is divisible by 41, and certainly when <i>n</i> = 41, 41² + 41 + 41 is clearly divisible by 41.</p>
|
||||
<p>The incredible formula <i>n</i>² <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' /> 79<i>n</i> + 1601 was discovered, which produces 80 primes for the consecutive values <i>n</i> = 0 to 79. The product of the coefficients, <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />79 and 1601, is <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />126479.</p>
|
||||
<p>Considering quadratics of the form:</p>
|
||||
<blockquote>
|
||||
<i>n</i>² + <i>an</i> + <i>b</i>, where |<i>a</i>| <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> 1000 and |<i>b</i>| <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> 1000<br /><br />
|
||||
<div class='info' style='text-align:left;'>where |<i>n</i>| is the modulus/absolute value of <i>n</i><br />e.g. |11| = 11 and |<img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />4| = 4</div>
|
||||
</blockquote>
|
||||
<p>Find the product of the coefficients, <i>a</i> and <i>b</i>, for the quadratic expression that produces the maximum number of primes for consecutive values of <i>n</i>, starting with <i>n</i> = 0.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
77
project_euler/pe/p028.html
Normal file
77
project_euler/pe/p028.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 28 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=b53ae"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Number spiral diagonals</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 28</h3><span style="width:300px;color:#666;">Published on Friday, 11th October 2002, 06:00 pm; Solved by 51916</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:</p>
|
||||
<p style='text-align:center;font-family:courier new;'><span style='color:#ff0000;font-family:courier new;'><b>21</b></span> 22 23 24 <span style='color:#ff0000;font-family:courier new;'><b>25</b></span><br />
|
||||
20 <span style='color:#ff0000;font-family:courier new;'><b>7</b></span> 8 <span style='color:#ff0000;font-family:courier new;'><b>9</b></span> 10<br />
|
||||
19 6 <span style='color:#ff0000;font-family:courier new;'><b>1</b></span> 2 11<br />
|
||||
18 <span style='color:#ff0000;font-family:courier new;'><b>5</b></span> 4 <span style='color:#ff0000;font-family:courier new;'><b>3</b></span> 12<br />
|
||||
<span style='color:#ff0000;font-family:courier new;'><b>17</b></span> 16 15 14 <span style='color:#ff0000;font-family:courier new;'><b>13</b></span></p>
|
||||
<p>It can be verified that the sum of the numbers on the diagonals is 101.</p>
|
||||
<p>What is the sum of the numbers on the diagonals in a 1001 by 1001 spiral formed in the same way?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
78
project_euler/pe/p029.html
Normal file
78
project_euler/pe/p029.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 29 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=86034"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Distinct powers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 29</h3><span style="width:300px;color:#666;">Published on Friday, 25th October 2002, 06:00 pm; Solved by 46051</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Consider all integer combinations of <i>a</i><sup><i>b</i></sup> for 2 <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <i>a</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 5 and 2 <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <i>b</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 5:</p>
|
||||
<blockquote>2<sup>2</sup>=4, 2<sup>3</sup>=8, 2<sup>4</sup>=16, 2<sup>5</sup>=32<br />
|
||||
3<sup>2</sup>=9, 3<sup>3</sup>=27, 3<sup>4</sup>=81, 3<sup>5</sup>=243<br />
|
||||
4<sup>2</sup>=16, 4<sup>3</sup>=64, 4<sup>4</sup>=256, 4<sup>5</sup>=1024<br />
|
||||
5<sup>2</sup>=25, 5<sup>3</sup>=125, 5<sup>4</sup>=625, 5<sup>5</sup>=3125<br /></blockquote>
|
||||
<p>If they are then placed in numerical order, with any repeats removed, we get the following sequence of 15 distinct terms:</p>
|
||||
<p style='text-align:center;'>4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125</p>
|
||||
<p>How many distinct terms are in the sequence generated by <i>a</i><sup><i>b</i></sup> for 2 <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <i>a</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 100 and 2 <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <i>b</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 100?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
77
project_euler/pe/p030.html
Normal file
77
project_euler/pe/p030.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 30 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=5db45"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Digit fifth powers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 30</h3><span style="width:300px;color:#666;">Published on Friday, 8th November 2002, 06:00 pm; Solved by 49082</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:</p>
|
||||
<blockquote>1634 = 1<sup>4</sup> + 6<sup>4</sup> + 3<sup>4</sup> + 4<sup>4</sup><br />
|
||||
8208 = 8<sup>4</sup> + 2<sup>4</sup> + 0<sup>4</sup> + 8<sup>4</sup><br />
|
||||
9474 = 9<sup>4</sup> + 4<sup>4</sup> + 7<sup>4</sup> + 4<sup>4</sup></blockquote>
|
||||
<p class='info'>As 1 = 1<sup>4</sup> is not a sum it is not included.</p>
|
||||
<p>The sum of these numbers is 1634 + 8208 + 9474 = 19316.</p>
|
||||
<p>Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p031.html
Normal file
75
project_euler/pe/p031.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 31 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=0e128"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Coin sums</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 31</h3><span style="width:300px;color:#666;">Published on Friday, 22nd November 2002, 06:00 pm; Solved by 35590</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:</p>
|
||||
<blockquote>1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).</blockquote>
|
||||
<p>It is possible to make £2 in the following way:</p>
|
||||
<blockquote>1<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />£1 + 1<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />50p + 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />20p + 1<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />5p + 1<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2p + 3<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />1p</blockquote>
|
||||
<p>How many different ways can £2 be made using any number of coins?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
76
project_euler/pe/p032.html
Normal file
76
project_euler/pe/p032.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 32 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=21273"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Pandigital products</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 32</h3><span style="width:300px;color:#666;">Published on Friday, 6th December 2002, 06:00 pm; Solved by 30851</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>We shall say that an <var>n</var>-digit number is pandigital if it makes use of all the digits 1 to <var>n</var> exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital.</p>
|
||||
|
||||
<p>The product 7254 is unusual, as the identity, 39 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 186 = 7254, containing multiplicand, multiplier, and product is 1 through 9 pandigital.</p>
|
||||
|
||||
<p>Find the sum of all products whose multiplicand/multiplier/product identity can be written as a 1 through 9 pandigital.</p>
|
||||
|
||||
<div class="info">HINT: Some products can be obtained in more than one way so be sure to only include it once in your sum.</div>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p033.html
Normal file
73
project_euler/pe/p033.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 33 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=79617"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Digit canceling fractions</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 33</h3><span style="width:300px;color:#666;">Published on Friday, 20th December 2002, 06:00 pm; Solved by 32231</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The fraction <sup>49</sup>/<sub>98</sub> is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that <sup>49</sup>/<sub>98</sub> = <sup>4</sup>/<sub>8</sub>, which is correct, is obtained by cancelling the 9s.</p>
|
||||
<p>We shall consider fractions like, <sup>30</sup>/<sub>50</sub> = <sup>3</sup>/<sub>5</sub>, to be trivial examples.</p>
|
||||
<p>There are exactly four non-trivial examples of this type of fraction, less than one in value, and containing two digits in the numerator and denominator.</p>
|
||||
<p>If the product of these four fractions is given in its lowest common terms, find the value of the denominator.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p034.html
Normal file
73
project_euler/pe/p034.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 34 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=b4f24"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Digit factorials</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 34</h3><span style="width:300px;color:#666;">Published on Friday, 3rd January 2003, 06:00 pm; Solved by 42992</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.</p>
|
||||
<p>Find the sum of all numbers which are equal to the sum of the factorial of their digits.</p>
|
||||
<p class='info'>Note: as 1! = 1 and 2! = 2 are not sums they are not included.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p035.html
Normal file
73
project_euler/pe/p035.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 35 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=27a12"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Circular primes</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 35</h3><span style="width:300px;color:#666;">Published on Friday, 17th January 2003, 06:00 pm; Solved by 39301</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.</p>
|
||||
<p>There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97.</p>
|
||||
<p>How many circular primes are there below one million?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p036.html
Normal file
73
project_euler/pe/p036.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 36 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=f2b95"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Double-base palindromes</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 36</h3><span style="width:300px;color:#666;">Published on Friday, 31st January 2003, 06:00 pm; Solved by 42142</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The decimal number, 585 = 1001001001<sub>2</sub> (binary), is palindromic in both bases.</p>
|
||||
<p>Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.</p>
|
||||
<p class='info'>(Please note that the palindromic number, in either base, may not include leading zeros.)</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p037.html
Normal file
73
project_euler/pe/p037.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 37 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=3df7d"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Truncatable primes</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 37</h3><span style="width:300px;color:#666;">Published on Friday, 14th February 2003, 06:00 pm; Solved by 33051</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, and 3.</p>
|
||||
<p>Find the sum of the only eleven primes that are both truncatable from left to right and right to left.</p>
|
||||
<p class='info'>NOTE: 2, 3, 5, and 7 are not considered to be truncatable primes.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
76
project_euler/pe/p038.html
Normal file
76
project_euler/pe/p038.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 38 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=3c67f"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Pandigital multiples</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 38</h3><span style="width:300px;color:#666;">Published on Friday, 28th February 2003, 06:00 pm; Solved by 27970</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Take the number 192 and multiply it by each of 1, 2, and 3:</p>
|
||||
<blockquote>192 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1 = 192<br />
|
||||
192 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 = 384<br />
|
||||
192 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 3 = 576</blockquote>
|
||||
<p>By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the concatenated product of 192 and (1,2,3)</p>
|
||||
<p>The same can be achieved by starting with 9 and multiplying by 1, 2, 3, 4, and 5, giving the pandigital, 918273645, which is the concatenated product of 9 and (1,2,3,4,5).</p>
|
||||
<p>What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, ... , <var>n</var>) where <var>n</var> <img src='images/symbol_gt.gif' width='10' height='10' alt='>' border='0' style='vertical-align:middle;' /> 1?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p039.html
Normal file
72
project_euler/pe/p039.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 39 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=146bf"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Integer right triangles</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 39</h3><span style="width:300px;color:#666;">Published on Friday, 14th March 2003, 06:00 pm; Solved by 32476</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>If <i>p</i> is the perimeter of a right angle triangle with integral length sides, {<i>a</i>,<i>b</i>,<i>c</i>}, there are exactly three solutions for <i>p</i> = 120.</p>
|
||||
<p style=\'text-align:center;\'>{20,48,52}, {24,45,51}, {30,40,50}</p>
|
||||
<p>For which value of <i>p</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 1000, is the number of solutions maximised?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p040.html
Normal file
74
project_euler/pe/p040.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 40 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=c6286"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Champernowne's constant</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 40</h3><span style="width:300px;color:#666;">Published on Friday, 28th March 2003, 06:00 pm; Solved by 36612</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>An irrational decimal fraction is created by concatenating the positive integers:</p>
|
||||
<p style='text-align:center;'>0.12345678910<span style='color:#dd0000;font-size:14pt;'>1</span>112131415161718192021...</p>
|
||||
<p>It can be seen that the 12<sup>th</sup> digit of the fractional part is 1.</p>
|
||||
<p>If <i>d</i><sub><i>n</i></sub> represents the <i>n</i><sup>th</sup> digit of the fractional part, find the value of the following expression.</p>
|
||||
<p style='text-align:center;'><i>d</i><sub>1</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>d</i><sub>10</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>d</i><sub>100</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>d</i><sub>1000</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>d</i><sub>10000</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>d</i><sub>100000</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>d</i><sub>1000000</sub></p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p041.html
Normal file
72
project_euler/pe/p041.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 41 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=5949f"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Pandigital prime</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 41</h3><span style="width:300px;color:#666;">Published on Friday, 11th April 2003, 06:00 pm; Solved by 30466</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>We shall say that an <i>n</i>-digit number is pandigital if it makes use of all the digits 1 to <i>n</i> exactly once. For example, 2143 is a 4-digit pandigital and is also prime.</p>
|
||||
<p>What is the largest <i>n</i>-digit pandigital prime that exists?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p042.html
Normal file
72
project_euler/pe/p042.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 42 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=025f5"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Coded triangle numbers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 42</h3><span style="width:300px;color:#666;">Published on Friday, 25th April 2003, 06:00 pm; Solved by 35451</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The <i>n</i><sup>th</sup> term of the sequence of triangle numbers is given by, <i>t<sub>n</sub></i> = ½<i>n</i>(<i>n</i>+1); so the first ten triangle numbers are:</p>
|
||||
<p style='text-align:center;'>1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...</p>
|
||||
<p>By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word value. For example, the word value for SKY is 19 + 11 + 25 = 55 = <i>t</i><sub>10</sub>. If the word value is a triangle number then we shall call the word a triangle word.</p>
|
||||
<p>Using <a href='project/words.txt'>words.txt</a> (right click and 'Save Link/Target As...'), a 16K text file containing nearly two-thousand common English words, how many are triangle words?</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
81
project_euler/pe/p043.html
Normal file
81
project_euler/pe/p043.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 43 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=b1eab"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Sub-string divisibility</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 43</h3><span style="width:300px;color:#666;">Published on Friday, 9th May 2003, 06:00 pm; Solved by 25542</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also has a rather interesting sub-string divisibility property.</p>
|
||||
<p>Let <i>d</i><sub>1</sub> be the 1<sup>st</sup> digit, <i>d</i><sub>2</sub> be the 2<sup>nd</sup> digit, and so on. In this way, we note the following:</p>
|
||||
<ul>
|
||||
<li><i>d</i><sub>2</sub><i>d</i><sub>3</sub><i>d</i><sub>4</sub>=406 is divisible by 2</li>
|
||||
<li><i>d</i><sub>3</sub><i>d</i><sub>4</sub><i>d</i><sub>5</sub>=063 is divisible by 3</li>
|
||||
<li><i>d</i><sub>4</sub><i>d</i><sub>5</sub><i>d</i><sub>6</sub>=635 is divisible by 5</li>
|
||||
<li><i>d</i><sub>5</sub><i>d</i><sub>6</sub><i>d</i><sub>7</sub>=357 is divisible by 7</li>
|
||||
<li><i>d</i><sub>6</sub><i>d</i><sub>7</sub><i>d</i><sub>8</sub>=572 is divisible by 11</li>
|
||||
<li><i>d</i><sub>7</sub><i>d</i><sub>8</sub><i>d</i><sub>9</sub>=728 is divisible by 13</li>
|
||||
<li><i>d</i><sub>8</sub><i>d</i><sub>9</sub><i>d</i><sub>10</sub>=289 is divisible by 17</li>
|
||||
</ul>
|
||||
<p>Find the sum of all 0 to 9 pandigital numbers with this property.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p044.html
Normal file
72
project_euler/pe/p044.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 44 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=b9b4e"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Pentagon numbers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 44</h3><span style="width:300px;color:#666;">Published on Friday, 23rd May 2003, 06:00 pm; Solved by 24736</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Pentagonal numbers are generated by the formula, P<sub><var>n</var></sub>=<var>n</var>(3<var>n</var><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1)/2. The first ten pentagonal numbers are:</p>
|
||||
<p style="text-align:center;">1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...</p>
|
||||
<p>It can be seen that P<sub>4</sub> + P<sub>7</sub> = 22 + 70 = 92 = P<sub>8</sub>. However, their difference, 70 <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' /> 22 = 48, is not pentagonal.</p>
|
||||
<p>Find the pair of pentagonal numbers, P<sub><var>j</var></sub> and P<sub><var>k</var></sub>, for which their sum and difference are pentagonal and D = |P<sub><var>k</var></sub> <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' /> P<sub><var>j</var></sub>| is minimised; what is the value of D?</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
95
project_euler/pe/p045.html
Normal file
95
project_euler/pe/p045.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 45 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=38e15"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Triangular, pentagonal, and hexagonal</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 45</h3><span style="width:300px;color:#666;">Published on Friday, 6th June 2003, 06:00 pm; Solved by 33631</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Triangle, pentagonal, and hexagonal numbers are generated by the following formulae:</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Triangle</td>
|
||||
<td> </td>
|
||||
<td>T<sub><i>n</i></sub>=<i>n</i>(<i>n</i>+1)/2</td>
|
||||
<td> </td>
|
||||
<td>1, 3, 6, 10, 15, ...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pentagonal</td>
|
||||
<td> </td>
|
||||
<td>P<sub><i>n</i></sub>=<i>n</i>(3<i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1)/2</td>
|
||||
<td> </td>
|
||||
<td>1, 5, 12, 22, 35, ...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hexagonal</td>
|
||||
<td> </td>
|
||||
<td>H<sub><i>n</i></sub>=<i>n</i>(2<i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1)</td>
|
||||
<td> </td>
|
||||
<td>1, 6, 15, 28, 45, ...</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>It can be verified that T<sub>285</sub> = P<sub>165</sub> = H<sub>143</sub> = 40755.</p>
|
||||
<p>Find the next triangle number that is also pentagonal and hexagonal.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
78
project_euler/pe/p046.html
Normal file
78
project_euler/pe/p046.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 46 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=9ed05"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Goldbach's other conjecture</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 46</h3><span style="width:300px;color:#666;">Published on Friday, 20th June 2003, 06:00 pm; Solved by 26194</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square.</p>
|
||||
<p style='margin-left:10px;'>9 = 7 + 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />1<sup>2</sup><br />
|
||||
15 = 7 + 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2<sup>2</sup><br />
|
||||
21 = 3 + 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />3<sup>2</sup><br />
|
||||
25 = 7 + 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />3<sup>2</sup><br />
|
||||
27 = 19 + 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2<sup>2</sup><br />
|
||||
33 = 31 + 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />1<sup>2</sup></p>
|
||||
<p>It turns out that the conjecture was false.</p>
|
||||
<p>What is the smallest odd composite that cannot be written as the sum of a prime and twice a square?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p047.html
Normal file
74
project_euler/pe/p047.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 47 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=373a8"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Distinct primes factors</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 47</h3><span style="width:300px;color:#666;">Published on Friday, 4th July 2003, 06:00 pm; Solved by 25492</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The first two consecutive numbers to have two distinct prime factors are:</p>
|
||||
<p style="margin-left:100px;">14 = 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 7<br />15 = 3 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 5</p>
|
||||
<p>The first three consecutive numbers to have three distinct prime factors are:</p>
|
||||
<p style="margin-left:100px;">644 = 2² <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 7 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 23<br />645 = 3 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 5 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 43<br />646 = 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 17 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 19.</p>
|
||||
<p>Find the first four consecutive integers to have four distinct prime factors. What is the first of these numbers?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p048.html
Normal file
72
project_euler/pe/p048.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 48 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=a5258"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Self powers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 48</h3><span style="width:300px;color:#666;">Published on Friday, 18th July 2003, 06:00 pm; Solved by 57199</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The series, 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ... + 10<sup>10</sup> = 10405071317.</p>
|
||||
<p>Find the last ten digits of the series, 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ... + 1000<sup>1000</sup>.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p049.html
Normal file
72
project_euler/pe/p049.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 49 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=63916"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Prime permutations</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 49</h3><span style="width:300px;color:#666;">Published on Friday, 1st August 2003, 06:00 pm; Solved by 25014</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another.</p>
|
||||
<p>There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting this property, but there is one other 4-digit increasing sequence.</p>
|
||||
<p>What 12-digit number do you form by concatenating the three terms in this sequence?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p050.html
Normal file
75
project_euler/pe/p050.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 50 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=17275"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Consecutive prime sum</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 50</h3><span style="width:300px;color:#666;">Published on Friday, 15th August 2003, 06:00 pm; Solved by 26956</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The prime 41, can be written as the sum of six consecutive primes:</p>
|
||||
<div style='text-align:center;'>41 = 2 + 3 + 5 + 7 + 11 + 13</div>
|
||||
<p>This is the longest sum of consecutive primes that adds to a prime below one-hundred.</p>
|
||||
<p>The longest sum of consecutive primes below one-thousand that adds to a prime, contains 21 terms, and is equal to 953.</p>
|
||||
<p>Which prime, below one-million, can be written as the sum of the most consecutive primes?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p051.html
Normal file
73
project_euler/pe/p051.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 51 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=a14d8"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Prime digit replacements</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 51</h3><span style="width:300px;color:#666;">Published on Friday, 29th August 2003, 06:00 pm; Solved by 13971</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<!--<p>By replacing the 1<sup>st</sup> digit of *57, it turns out that six of the possible values: 157, 257, 457, 557, 757, and 857, are all prime.</p> -->
|
||||
<p>By replacing the 1<sup>st</sup> digit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime.</p>
|
||||
<p>By replacing the 3<sup>rd</sup> and 4<sup>th</sup> digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten generated numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993. Consequently 56003, being the first member of this family, is the smallest prime with this property.</p>
|
||||
<p>Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p052.html
Normal file
72
project_euler/pe/p052.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 52 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=2ac74"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Permuted multiples</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 52</h3><span style="width:300px;color:#666;">Published on Friday, 12th September 2003, 06:00 pm; Solved by 31822</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.</p>
|
||||
<p>Find the smallest positive integer, <i>x</i>, such that 2<i>x</i>, 3<i>x</i>, 4<i>x</i>, 5<i>x</i>, and 6<i>x</i>, contain the same digits.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
84
project_euler/pe/p053.html
Normal file
84
project_euler/pe/p053.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 53 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=b81e3"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Combinatoric selections</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 53</h3><span style="width:300px;color:#666;">Published on Friday, 26th September 2003, 06:00 pm; Solved by 28891</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>There are exactly ten ways of selecting three from five, 12345:</p>
|
||||
<p style="text-align:center;">123, 124, 125, 134, 135, 145, 234, 235, 245, and 345</p>
|
||||
<p>In combinatorics, we use the notation, <sup>5</sup>C<sub>3</sub> = 10.</p>
|
||||
<p>In general,</p>
|
||||
<div style="text-align:center;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><sup><var>n</var></sup>C<sub><var>r</var></sub> = </td>
|
||||
<td><div style="text-align:center;"><var>n</var>!<br /><span style="border-top:1px solid #000;"><var>r</var>!(<var>n<img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />r</var>)!</span></div></td>
|
||||
<td>,where <var>r</var> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <var>n</var>, <var>n</var>! = <var>n</var><img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />(<var>n</var><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1)<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />...<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />3<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />1, and 0! = 1.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>It is not until <var>n</var> = 23, that a value exceeds one-million: <sup>23</sup>C<sub>10</sub> = 1144066.</p>
|
||||
<p>How many, not necessarily distinct, values of <sup><var>n</var></sup>C<sub><var>r</var></sub>, for 1 <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <var>n</var> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 100, are greater than one-million?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
108
project_euler/pe/p054.html
Normal file
108
project_euler/pe/p054.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 54 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=b950b"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Poker hands</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 54</h3><span style="width:300px;color:#666;">Published on Friday, 10th October 2003, 06:00 pm; Solved by 15536</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way:</p>
|
||||
<ul>
|
||||
<li><b>High Card</b>: Highest value card.</li>
|
||||
<li><b>One Pair</b>: Two cards of the same value.</li>
|
||||
<li><b>Two Pairs</b>: Two different pairs.</li>
|
||||
<li><b>Three of a Kind</b>: Three cards of the same value.</li>
|
||||
<li><b>Straight</b>: All cards are consecutive values.</li>
|
||||
<li><b>Flush</b>: All cards of the same suit.</li>
|
||||
<li><b>Full House</b>: Three of a kind and a pair.</li>
|
||||
<li><b>Four of a Kind</b>: Four cards of the same value.</li>
|
||||
<li><b>Straight Flush</b>: All cards are consecutive values of same suit.</li>
|
||||
<li><b>Royal Flush</b>: Ten, Jack, Queen, King, Ace, in same suit.</li>
|
||||
</ul>
|
||||
<p>The cards are valued in the order:<br />2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace.</p>
|
||||
<p>If two players have the same ranked hands then the rank made up of the highest value wins; for example, a pair of eights beats a pair of fives (see example 1 below). But if two ranks tie, for example, both players have a pair of queens, then highest cards in each hand are compared (see example 4 below); if the highest cards tie then the next highest cards are compared, and so on.</p>
|
||||
<p>Consider the following five hands dealt to two players:</p>
|
||||
<div style="text-align:center;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>Hand</b></td><td> </td><td><b>Player 1</b></td><td> </td><td><b>Player 2</b></td><td> </td><td><b>Winner</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top;"><b>1</b></td><td> </td><td>5H 5C 6S 7S KD<br /><div class="info">Pair of Fives</div></td><td> </td><td>2C 3S 8S 8D TD<br /><div class="info">Pair of Eights</div></td><td> </td><td style="vertical-align:top;">Player 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top;"><b>2</b></td><td> </td><td>5D 8C 9S JS AC<br /><div class="info">Highest card Ace</div></td><td> </td><td>2C 5C 7D 8S QH<br /><div class="info">Highest card Queen</div></td><td> </td><td style="vertical-align:top;">Player 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top;"><b>3</b></td><td> </td><td>2D 9C AS AH AC<br /><div class="info">Three Aces</div></td><td> </td><td>3D 6D 7D TD QD<br /><div class="info">Flush with Diamonds</div></td><td> </td><td style="vertical-align:top;">Player 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top;"><b>4</b></td><td> </td><td>4D 6S 9H QH QC<br /><div class="info">Pair of Queens<br />Highest card Nine</div></td><td> </td><td>3D 6D 7H QD QS<br /><div class="info">Pair of Queens<br />Highest card Seven</div></td><td> </td><td style="vertical-align:top;">Player 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top;"><b>5</b></td><td> </td><td>2H 2D 4C 4D 4S<br /><div class="info">Full House<br />With Three Fours</div></td><td> </td><td>3C 3D 3S 9S 9D<br /><div class="info">Full House<br />with Three Threes</div></td><td> </td><td style="vertical-align:top;">Player 1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>The file, <a href="project/poker.txt">poker.txt</a>, contains one-thousand random hands dealt to two players. Each line of the file contains ten cards (separated by a single space): the first five are Player 1's cards and the last five are Player 2's cards. You can assume that all hands are valid (no invalid characters or repeated cards), each player's hand is in no specific order, and in each hand there is a clear winner.</p>
|
||||
<p>How many hands does Player 1 win?</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
78
project_euler/pe/p055.html
Normal file
78
project_euler/pe/p055.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 55 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=24478"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Lychrel numbers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 55</h3><span style="width:300px;color:#666;">Published on Friday, 24th October 2003, 06:00 pm; Solved by 25842</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>If we take 47, reverse and add, 47 + 74 = 121, which is palindromic.</p>
|
||||
<p>Not all numbers produce palindromes so quickly. For example,</p>
|
||||
<p style='margin-left:50px;'>349 + 943 = 1292,<br />
|
||||
1292 + 2921 = 4213<br />
|
||||
4213 + 3124 = 7337</p>
|
||||
<p>That is, 349 took three iterations to arrive at a palindrome.</p>
|
||||
<p>Although no one has proved it yet, it is thought that some numbers, like 196, never produce a palindrome. A number that never forms a palindrome through the reverse and add process is called a Lychrel number. Due to the theoretical nature of these numbers, and for the purpose of this problem, we shall assume that a number is Lychrel until proven otherwise. In addition you are given that for every number below ten-thousand, it will either (i) become a palindrome in less than fifty iterations, or, (ii) no one, with all the computing power that exists, has managed so far to map it to a palindrome. In fact, 10677 is the first number to be shown to require over fifty iterations before producing a palindrome: 4668731596684224866951378664 (53 iterations, 28-digits).</p>
|
||||
<p>Surprisingly, there are palindromic numbers that are themselves Lychrel numbers; the first example is 4994.</p>
|
||||
<p>How many Lychrel numbers are there below ten-thousand?</p>
|
||||
<p class="info">NOTE: Wording was modified slightly on 24 April 2007 to emphasise the theoretical nature of Lychrel numbers.</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p056.html
Normal file
72
project_euler/pe/p056.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 56 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=774ed"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Powerful digit sum</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 56</h3><span style="width:300px;color:#666;">Published on Friday, 7th November 2003, 06:00 pm; Solved by 27610</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>A googol (10<sup>100</sup>) is a massive number: one followed by one-hundred zeros; 100<sup>100</sup> is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each number is only 1.</p>
|
||||
<p>Considering natural numbers of the form, <i>a<sup>b</sup></i>, where <i>a, b</i> <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> 100, what is the maximum digital sum?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
78
project_euler/pe/p057.html
Normal file
78
project_euler/pe/p057.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 57 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=9b919"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Square root convergents</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 57</h3><span style="width:300px;color:#666;">Published on Friday, 21st November 2003, 06:00 pm; Solved by 18642</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>It is possible to show that the square root of two can be expressed as an infinite continued fraction.</p>
|
||||
<p style='text-align:center;'><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' /> 2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213...</p>
|
||||
<p>By expanding this for the first four iterations, we get:</p>
|
||||
<p>1 + 1/2 = 3/2 = 1.5<br />
|
||||
1 + 1/(2 + 1/2) = 7/5 = 1.4<br />
|
||||
1 + 1/(2 + 1/(2 + 1/2)) = 17/12 = 1.41666...<br />
|
||||
1 + 1/(2 + 1/(2 + 1/(2 + 1/2))) = 41/29 = 1.41379...<br /></p>
|
||||
<p>The next three expansions are 99/70, 239/169, and 577/408, but the eighth expansion, 1393/985, is the first example where the number of digits in the numerator exceeds the number of digits in the denominator.</p>
|
||||
<p>In the first one-thousand expansions, how many fractions contain a numerator with more digits than denominator?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
79
project_euler/pe/p058.html
Normal file
79
project_euler/pe/p058.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 58 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=33017"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Spiral primes</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 58</h3><span style="width:300px;color:#666;">Published on Friday, 5th December 2003, 06:00 pm; Solved by 18101</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Starting with 1 and spiralling anticlockwise in the following way, a square spiral with side length 7 is formed.</p>
|
||||
<p style='text-align:center;font-family:courier new;'><span style='color:#ff0000;font-family:courier new;'><b>37</b></span> 36 35 34 33 32 <span style='color:#ff0000;font-family:courier new;'><b>31</b></span><br />
|
||||
38 <span style='color:#ff0000;font-family:courier new;'><b>17</b></span> 16 15 14 <span style='color:#ff0000;font-family:courier new;'><b>13</b></span> 30<br />
|
||||
39 18 <span style='color:#ff0000;font-family:courier new;'> <b>5</b></span> 4 <span style='color:#ff0000;font-family:courier new;'> <b>3</b></span> 12 29<br />
|
||||
40 19 6 1 2 11 28<br />
|
||||
41 20 <span style='color:#ff0000;font-family:courier new;'> <b>7</b></span> 8 9 10 27<br />
|
||||
42 21 22 23 24 25 26<br />
|
||||
<span style='color:#ff0000;font-family:courier new;'><b>43</b></span> 44 45 46 47 48 49</p>
|
||||
<p>It is interesting to note that the odd squares lie along the bottom right diagonal, but what is more interesting is that 8 out of the 13 numbers lying along both diagonals are prime; that is, a ratio of 8/13 <img src='images/symbol_asymp.gif' width='11' height='9' alt='≈' border='0' style='vertical-align:middle;' /> 62%.</p>
|
||||
<p>If one complete new layer is wrapped around the spiral above, a square spiral with side length 9 will be formed. If this process is continued, what is the side length of the square spiral for which the ratio of primes along both diagonals first falls below 10%?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p059.html
Normal file
75
project_euler/pe/p059.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 59 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=c088b"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>XOR decryption</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 59</h3><span style="width:300px;color:#666;">Published on Friday, 19th December 2003, 06:00 pm; Solved by 19651</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107.</p>
|
||||
<p>A modern encryption method is to take a text file, convert the bytes to ASCII, then XOR each byte with a given value, taken from a secret key. The advantage with the XOR function is that using the same encryption key on the cipher text, restores the plain text; for example, 65 XOR 42 = 107, then 107 XOR 42 = 65.</p>
|
||||
<p>For unbreakable encryption, the key is the same length as the plain text message, and the key is made up of random bytes. The user would keep the encrypted message and the encryption key in different locations, and without both "halves", it is impossible to decrypt the message.</p>
|
||||
<p>Unfortunately, this method is impractical for most users, so the modified method is to use a password as a key. If the password is shorter than the message, which is likely, the key is repeated cyclically throughout the message. The balance for this method is using a sufficiently long password key for security, but short enough to be memorable.</p>
|
||||
<p>Your task has been made easy, as the encryption key consists of three lower case characters. Using <a href='project/cipher1.txt'>cipher1.txt</a> (right click and 'Save Link/Target As...'), a file containing the encrypted ASCII codes, and the knowledge that the plain text must contain common English words, decrypt the message and find the sum of the ASCII values in the original text.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p060.html
Normal file
72
project_euler/pe/p060.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 60 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=caf15"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Prime pair sets</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 60</h3><span style="width:300px;color:#666;">Published on Friday, 2nd January 2004, 06:00 pm; Solved by 11099</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four primes, 792, represents the lowest sum for a set of four primes with this property.</p>
|
||||
<p>Find the lowest sum for a set of five primes for which any two primes concatenate to produce another prime.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
121
project_euler/pe/p061.html
Normal file
121
project_euler/pe/p061.html
Normal file
@@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 61 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=0af35"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Cyclical figurate numbers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 61</h3><span style="width:300px;color:#666;">Published on Friday, 16th January 2004, 06:00 pm; Solved by 11199</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae:</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Triangle</td>
|
||||
<td> </td>
|
||||
<td>P<sub>3,<i>n</i></sub>=<i>n</i>(<i>n</i>+1)/2</td>
|
||||
<td> </td>
|
||||
<td>1, 3, 6, 10, 15, ...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Square</td>
|
||||
<td> </td>
|
||||
<td>P<sub>4,<i>n</i></sub>=<i>n</i><sup>2</sup></td>
|
||||
<td> </td>
|
||||
<td>1, 4, 9, 16, 25, ...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pentagonal</td>
|
||||
<td> </td>
|
||||
<td>P<sub>5,<i>n</i></sub>=<i>n</i>(3<i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1)/2</td>
|
||||
<td> </td>
|
||||
<td>1, 5, 12, 22, 35, ...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hexagonal</td>
|
||||
<td> </td>
|
||||
<td>P<sub>6,<i>n</i></sub>=<i>n</i>(2<i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1)</td>
|
||||
<td> </td>
|
||||
<td>1, 6, 15, 28, 45, ...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heptagonal</td>
|
||||
<td> </td>
|
||||
<td>P<sub>7,<i>n</i></sub>=<i>n</i>(5<i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />3)/2</td>
|
||||
<td> </td>
|
||||
<td>1, 7, 18, 34, 55, ...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Octagonal</td>
|
||||
<td> </td>
|
||||
<td>P<sub>8,<i>n</i></sub>=<i>n</i>(3<i>n</i><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />2)</td>
|
||||
<td> </td>
|
||||
<td>1, 8, 21, 40, 65, ...</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>The ordered set of three 4-digit numbers: 8128, 2882, 8281, has three interesting properties.</p>
|
||||
<ol>
|
||||
<li>The set is cyclic, in that the last two digits of each number is the first two digits of the next number (including the last number with the first).</li>
|
||||
<li>Each polygonal type: triangle (P<sub>3,127</sub>=8128), square (P<sub>4,91</sub>=8281), and pentagonal (P<sub>5,44</sub>=2882), is represented by a different number in the set.</li>
|
||||
<li>This is the only set of 4-digit numbers with this property.</li>
|
||||
</ol>
|
||||
<p>Find the sum of the only ordered set of six cyclic 4-digit numbers for which each polygonal type: triangle, square, pentagonal, hexagonal, heptagonal, and octagonal, is represented by a different number in the set.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
71
project_euler/pe/p062.html
Normal file
71
project_euler/pe/p062.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 62 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=9c5a7"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Cubic permutations</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 62</h3><span style="width:300px;color:#666;">Published on Friday, 30th January 2004, 06:00 pm; Solved by 13791</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The cube, 41063625 (345<sup>3</sup>), can be permuted to produce two other cubes: 56623104 (384<sup>3</sup>) and 66430125 (405<sup>3</sup>). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube.</p>
|
||||
<p>Find the smallest cube for which exactly five permutations of its digits are cube.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p063.html
Normal file
72
project_euler/pe/p063.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 63 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=64146"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Powerful digit counts</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 63</h3><span style="width:300px;color:#666;">Published on Friday, 13th February 2004, 06:00 pm; Solved by 20221</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The 5-digit number, 16807=7<sup>5</sup>, is also a fifth power. Similarly, the 9-digit number, 134217728=8<sup>9</sup>, is a ninth power.</p>
|
||||
<p>How many <i>n</i>-digit positive integers exist which are also an <i>n</i>th power?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
238
project_euler/pe/p064.html
Normal file
238
project_euler/pe/p064.html
Normal file
@@ -0,0 +1,238 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 64 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=eeaee"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Odd period square roots</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 64</h3><span style="width:300px;color:#666;">Published on Friday, 27th February 2004, 06:00 pm; Solved by 9824</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>All square roots are periodic when written as continued fractions and can be written in the form:</p>
|
||||
<div style="margin-left:20px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' /><var>N</var> = <var>a</var><sub>0</sub> +</td>
|
||||
<td colspan="3" style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><var>a</var><sub>1</sub> +</td>
|
||||
<td colspan="2" style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><var>a</var><sub>2</sub> +</td>
|
||||
<td style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><var>a</var><sub>3</sub> + ...</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>For example, let us consider <img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23:</p>
|
||||
<div style="margin-left:20px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23 = 4 + <img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23 — 4 = 4 + </td>
|
||||
<td style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
<td> = 4 + </td>
|
||||
<td colspan="2" style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">1<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</span></div></td>
|
||||
<td> </td>
|
||||
<td>1 + </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23 – 3</span><br />7</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>If we continue we would get the following expansion:</p>
|
||||
<div style="margin-left:20px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23 = 4 +</td>
|
||||
<td colspan="4" style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>1 +</td>
|
||||
<td colspan="3" style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>3 +</td>
|
||||
<td colspan="2" style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>1 +</td>
|
||||
<td style="border-bottom:1px solid #000;"><div style="text-align:center;">1</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>8 + ...</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>The process can be summarised as follows:</p>
|
||||
<div style="margin-left:20px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><var>a</var><sub>0</sub> = 4,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">1<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+4</span><br />7</div></td>
|
||||
<td> = 1 + </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span><br />7</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var>a</var><sub>1</sub> = 1,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">7<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;">7(<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+3)</span><br />14</div></td>
|
||||
<td> = 3 + </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span><br />2</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var>a</var><sub>2</sub> = 3,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">2<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;">2(<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+3)</span><br />14</div></td>
|
||||
<td> = 1 + </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</span><br />7</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var>a</var><sub>3</sub> = 1,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">7<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;">7(<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+4)</span><br />7</div></td>
|
||||
<td> = 8 + </td>
|
||||
<td><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var>a</var><sub>4</sub> = 8,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">1<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+4</span><br />7</div></td>
|
||||
<td> = 1 + </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span><br />7</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var>a</var><sub>5</sub> = 1,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">7<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;">7(<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+3)</span><br />14</div></td>
|
||||
<td> = 3 + </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span><br />2</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var>a</var><sub>6</sub> = 3,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">2<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—3</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;">2(<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+3)</span><br />14</div></td>
|
||||
<td> = 1 + </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</span><br />7</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var>a</var><sub>7</sub> = 1,</td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">7<br /><span style="border-top:1px solid #000;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</span></div></td>
|
||||
<td> = </td>
|
||||
<td><div style="text-align:center;"><span style="border-bottom:1px solid #000;">7(<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23+4)</span><br />7</div></td>
|
||||
<td> = 8 + </td>
|
||||
<td><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23—4</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>It can be seen that the sequence is repeating. For conciseness, we use the notation <img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23 = [4;(1,3,1,8)], to indicate that the block (1,3,1,8) repeats indefinitely.</p>
|
||||
|
||||
<p>The first ten continued fraction representations of (irrational) square roots are:</p>
|
||||
<p style="margin-left:20px;"><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />2=[1;(2)], period=1<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />3=[1;(1,2)], period=2<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />5=[2;(4)], period=1<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />6=[2;(2,4)], period=2<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />7=[2;(1,1,1,4)], period=4<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />8=[2;(1,4)], period=2<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />10=[3;(6)], period=1<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />11=[3;(3,6)], period=2<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />12= [3;(2,6)], period=2<br />
|
||||
<img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />13=[3;(1,1,1,1,6)], period=5</p>
|
||||
<p>Exactly four continued fractions, for <var>N</var> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 13, have an odd period.</p>
|
||||
<p>How many continued fractions for <var>N</var> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 10000 have an odd period?</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
209
project_euler/pe/p065.html
Normal file
209
project_euler/pe/p065.html
Normal file
@@ -0,0 +1,209 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 65 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=3505c"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Convergents of e</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 65</h3><span style="width:300px;color:#666;">Published on Friday, 12th March 2004, 06:00 pm; Solved by 13567</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The square root of 2 can be written as an infinite continued fraction.</p>
|
||||
<div style="margin-left:20px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />2 = 1 +</td>
|
||||
<td colspan="4"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="135" height="1" alt="" /><br /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td colspan="3"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="110" height="1" alt="" /><br /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td colspan="2"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="85" height="1" alt="" /><br /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="60" height="1" alt="" /><br /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>2 + ...</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>The infinite continued fraction can be written, <img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />2 = [1;(2)], (2) indicates that 2 repeats <i>ad infinitum</i>. In a similar way, <img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />23 = [4;(1,3,1,8)].</p>
|
||||
<p>It turns out that the sequence of partial values of continued fractions for square roots provide the best rational approximations. Let us consider the convergents for <img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />2.</p>
|
||||
<div style="margin-left:20px;">
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>1 +</td>
|
||||
<td><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="15" height="1" alt="" /><br /></div></td>
|
||||
<td>= 3/2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">2</div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>1 +</td>
|
||||
<td colspan="2"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="50" height="1" alt="" /><br /></div></td>
|
||||
<td>= 7/5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="15" height="1" alt="" /><br /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">2</div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>1 +</td>
|
||||
<td colspan="3"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="80" height="1" alt="" /><br /></div></td>
|
||||
<td>= 17/12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td colspan="2"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="50" height="1" alt="" /><br /></div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="15" height="1" alt="" /><br /></div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">2</div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>1 +</td>
|
||||
<td colspan="4"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="110" height="1" alt="" /><br /></div></td>
|
||||
<td>= 41/29</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td colspan="3"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="80" height="1" alt="" /><br /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td colspan="2"><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="50" height="1" alt="" /><br /></div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>2 +</td>
|
||||
<td><div style="text-align:center;">1<br /><img src="images/blackdot.gif" width="15" height="1" alt="" /><br /></div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><div style="text-align:center;">2</div></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>Hence the sequence of the first ten convergents for <img src='images/symbol_radic.gif' width='14' height='16' alt='√' border='0' style='vertical-align:middle;' />2 are:</p>
|
||||
<div class="info">1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, ...</div>
|
||||
<p>What is most surprising is that the important mathematical constant,<br /><i>e</i> = [2; 1,2,1, 1,4,1, 1,6,1 , ... , 1,2<i>k</i>,1, ...].</p>
|
||||
<p>The first ten terms in the sequence of convergents for <i>e</i> are:</p>
|
||||
<div class="info">2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536, ...</div>
|
||||
<p>The sum of digits in the numerator of the 10<sup>th</sup> convergent is 1+4+5+7=17.</p>
|
||||
<p>Find the sum of digits in the numerator of the 100<sup>th</sup> convergent of the continued fraction for <i>e</i>.</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
81
project_euler/pe/p066.html
Normal file
81
project_euler/pe/p066.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 66 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=943f3"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Diophantine equation</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 66</h3><span style="width:300px;color:#666;">Published on Friday, 26th March 2004, 06:00 pm; Solved by 8716</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Consider quadratic Diophantine equations of the form:</p>
|
||||
<p style='text-align:center;'><i>x</i><sup>2</sup> – D<i>y</i><sup>2</sup> = 1</p>
|
||||
<p>For example, when D=13, the minimal solution in <i>x</i> is 649<sup>2</sup> – 13<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />180<sup>2</sup> = 1.</p>
|
||||
<p>It can be assumed that there are no solutions in positive integers when D is square.</p>
|
||||
<p>By finding minimal solutions in <i>x</i> for D = {2, 3, 5, 6, 7}, we obtain the following:</p>
|
||||
<p style='margin-left:20px;'>3<sup>2</sup> – 2<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2<sup>2</sup> = 1<br />
|
||||
2<sup>2</sup> – 3<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />1<sup>2</sup> = 1<br />
|
||||
<span style='color:#dd0000;font-weight:bold;'>9</span><sup>2</sup> – 5<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />4<sup>2</sup> = 1<br />
|
||||
5<sup>2</sup> – 6<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2<sup>2</sup> = 1<br />
|
||||
8<sup>2</sup> – 7<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />3<sup>2</sup> = 1</p>
|
||||
<p>Hence, by considering minimal solutions in <i>x</i> for D <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 7, the largest <i>x</i> is obtained when D=5.</p>
|
||||
<p>Find the value of D <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 1000 in minimal solutions of <i>x</i> for which the largest value of <i>x</i> is obtained.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
77
project_euler/pe/p067.html
Normal file
77
project_euler/pe/p067.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 67 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=a85da"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Maximum path sum II</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 67</h3><span style="width:300px;color:#666;">Published on Friday, 9th April 2004, 06:00 pm; Solved by 46215</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.</p>
|
||||
<p style="text-align:center;font-family:courier new;font-size:12pt;"><span style="color:#ff0000;"><b>3</b></span><br />
|
||||
<span style="color:#ff0000;"><b>7</b></span> 4<br />
|
||||
2 <span style="color:#ff0000;"><b>4</b></span> 6<br />
|
||||
8 5 <span style="color:#ff0000;"><b>9</b></span> 3</p>
|
||||
<p>That is, 3 + 7 + 4 + 9 = 23.</p>
|
||||
<p>Find the maximum total from top to bottom in <a href="project/triangle.txt">triangle.txt</a> (right click and 'Save Link/Target As...'), a 15K text file containing a triangle with one-hundred rows.</p>
|
||||
<p class="info"><b>NOTE:</b> This is a much more difficult version of <a href="index.php?section=problems&id=18">Problem 18</a>. It is not possible to try every route to solve this problem, as there are 2<sup>99</sup> altogether! If you could check one trillion (10<sup>12</sup>) routes every second it would take over twenty billion years to check them all. There is an efficient algorithm to solve it. ;o)</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
111
project_euler/pe/p068.html
Normal file
111
project_euler/pe/p068.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 68 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=10b1f"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Magic 5-gon ring</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 68</h3><span style="width:300px;color:#666;">Published on Friday, 23rd April 2004, 06:00 pm; Solved by 9204</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Consider the following "magic" 3-gon ring, filled with the numbers 1 to 6, and each line adding to nine.</p>
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_068_1.gif" alt="" /><br />
|
||||
</div>
|
||||
<p>Working <b>clockwise</b>, and starting from the group of three with the numerically lowest external node (4,3,2 in this example), each solution can be described uniquely. For example, the above solution can be described by the set: 4,3,2; 6,2,1; 5,1,3.</p>
|
||||
<p>It is possible to complete the ring with four different totals: 9, 10, 11, and 12. There are eight solutions in total.</p>
|
||||
<div style="text-align:center;">
|
||||
<table width="400" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100"><b>Total</b></td><td width="300"><b>Solution Set</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9</td><td>4,2,3; 5,3,1; 6,1,2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9</td><td>4,3,2; 6,2,1; 5,1,3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td><td>2,3,5; 4,5,1; 6,1,3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td><td>2,5,3; 6,3,1; 4,1,5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>11</td><td>1,4,6; 3,6,2; 5,2,4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>11</td><td>1,6,4; 5,4,2; 3,2,6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12</td><td>1,5,6; 2,6,4; 3,4,5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12</td><td>1,6,5; 3,5,4; 2,4,6</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>By concatenating each group it is possible to form 9-digit strings; the maximum string for a 3-gon ring is 432621513.</p>
|
||||
<p>Using the numbers 1 to 10, and depending on arrangements, it is possible to form 16- and 17-digit strings. What is the maximum <b>16-digit</b> string for a "magic" 5-gon ring?</p>
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_068_2.gif" alt="" /><br />
|
||||
</div>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
137
project_euler/pe/p069.html
Normal file
137
project_euler/pe/p069.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 69 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=29482"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Totient maximum</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 69</h3><span style="width:300px;color:#666;">Published on Friday, 7th May 2004, 06:00 pm; Solved by 16210</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Euler's Totient function, φ(<i>n</i>) [sometimes called the phi function], is used to determine the number of numbers less than <i>n</i> which are relatively prime to <i>n</i>. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6.</p>
|
||||
<div style='margin-left:100px;'>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<td><b><i>n</i></b></td>
|
||||
<td><b>Relatively Prime</b></td>
|
||||
<td><b>φ(<i>n</i>)</b></td>
|
||||
<td><b><i>n</i>/φ(<i>n</i>)</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>1,2</td>
|
||||
<td>2</td>
|
||||
<td>1.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>1,3</td>
|
||||
<td>2</td>
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>1,2,3,4</td>
|
||||
<td>4</td>
|
||||
<td>1.25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>1,5</td>
|
||||
<td>2</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>7</td>
|
||||
<td>1,2,3,4,5,6</td>
|
||||
<td>6</td>
|
||||
<td>1.1666...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td>1,3,5,7</td>
|
||||
<td>4</td>
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9</td>
|
||||
<td>1,2,4,5,7,8</td>
|
||||
<td>6</td>
|
||||
<td>1.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>1,3,7,9</td>
|
||||
<td>4</td>
|
||||
<td>2.5</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>It can be seen that <i>n</i>=6 produces a maximum <i>n</i>/φ(<i>n</i>) for <i>n</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 10.</p>
|
||||
<p>Find the value of <i>n</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 1,000,000 for which <i>n</i>/φ(<i>n</i>) is a maximum.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p070.html
Normal file
72
project_euler/pe/p070.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 70 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=61ed5"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Totient permutation</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 70</h3><span style="width:300px;color:#666;">Published on Friday, 21st May 2004, 06:00 pm; Solved by 10371</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Euler's Totient function, φ(<var>n</var>) [sometimes called the phi function], is used to determine the number of positive numbers less than or equal to <var>n</var> which are relatively prime to <var>n</var>. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6.<br />The number 1 is considered to be relatively prime to every positive number, so φ(1)=1. </p>
|
||||
<p>Interestingly, φ(87109)=79180, and it can be seen that 87109 is a permutation of 79180.</p>
|
||||
<p>Find the value of <var>n</var>, 1 <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> <var>n</var> <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> 10<sup>7</sup>, for which φ(<var>n</var>) is a permutation of <var>n</var> and the ratio <var>n</var>/φ(<var>n</var>) produces a minimum.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p071.html
Normal file
75
project_euler/pe/p071.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 71 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=f1697"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Ordered fractions</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 71</h3><span style="width:300px;color:#666;">Published on Friday, 4th June 2004, 06:00 pm; Solved by 13620</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Consider the fraction, <i>n/d</i>, where <i>n</i> and <i>d</i> are positive integers. If <i>n</i><img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /><i>d</i> and HCF(<i>n,d</i>)=1, it is called a reduced proper fraction.</p>
|
||||
<p>If we list the set of reduced proper fractions for <i>d</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 8 in ascending order of size, we get:</p>
|
||||
<p style='text-align:center;font-size:8pt;'>1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, <b>2/5</b>, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8</p>
|
||||
<p>It can be seen that 2/5 is the fraction immediately to the left of 3/7.</p>
|
||||
<p>By listing the set of reduced proper fractions for <i>d</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 1,000,000 in ascending order of size, find the numerator of the fraction immediately to the left of 3/7.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p072.html
Normal file
75
project_euler/pe/p072.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 72 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=aa7fe"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Counting fractions</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 72</h3><span style="width:300px;color:#666;">Published on Friday, 18th June 2004, 06:00 pm; Solved by 10348</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Consider the fraction, <i>n/d</i>, where <i>n</i> and <i>d</i> are positive integers. If <i>n</i><img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /><i>d</i> and HCF(<i>n,d</i>)=1, it is called a reduced proper fraction.</p>
|
||||
<p>If we list the set of reduced proper fractions for <i>d</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 8 in ascending order of size, we get:</p>
|
||||
<p style='text-align:center;font-size:8pt;'>1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8</p>
|
||||
<p>It can be seen that there are 21 elements in this set.</p>
|
||||
<p>How many elements would be contained in the set of reduced proper fractions for <i>d</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 1,000,000?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p073.html
Normal file
75
project_euler/pe/p073.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 73 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=4addc"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Counting fractions in a range</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 73</h3><span style="width:300px;color:#666;">Published on Friday, 2nd July 2004, 06:00 pm; Solved by 12436</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Consider the fraction, <i>n/d</i>, where <i>n</i> and <i>d</i> are positive integers. If <i>n</i><img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /><i>d</i> and HCF(<i>n,d</i>)=1, it is called a reduced proper fraction.</p>
|
||||
<p>If we list the set of reduced proper fractions for <i>d</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 8 in ascending order of size, we get:</p>
|
||||
<p style='text-align:center;font-size:8pt;'>1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, <b>3/8, 2/5, 3/7</b>, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8</p>
|
||||
<p>It can be seen that there are 3 fractions between 1/3 and 1/2.</p>
|
||||
<p>How many fractions lie between 1/3 and 1/2 in the sorted set of reduced proper fractions for <i>d</i> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 12,000?</p>
|
||||
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
82
project_euler/pe/p074.html
Normal file
82
project_euler/pe/p074.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 74 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=ed474"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Digit factorial chains</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 74</h3><span style="width:300px;color:#666;">Published on Friday, 16th July 2004, 06:00 pm; Solved by 12411</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The number 145 is well known for the property that the sum of the factorial of its digits is equal to 145:</p>
|
||||
<p style='margin-left:50px;'>1! + 4! + 5! = 1 + 24 + 120 = 145</p>
|
||||
<p>Perhaps less well known is 169, in that it produces the longest chain of numbers that link back to 169; it turns out that there are only three such loops that exist:</p>
|
||||
<p style='margin-left:50px;'>169 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 363601 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 1454 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 169<br />
|
||||
871 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 45361 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 871<br />
|
||||
872 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 45362 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 872</p>
|
||||
<p>It is not difficult to prove that EVERY starting number will eventually get stuck in a loop. For example,</p>
|
||||
<p style='margin-left:50px;'>69 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 363600 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 1454 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 169 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 363601 (<img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 1454)<br />
|
||||
78 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 45360 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 871 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 45361 (<img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 871)<br />
|
||||
540 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 145 (<img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 145)</p>
|
||||
<p>Starting with 69 produces a chain of five non-repeating terms, but the longest non-repeating chain with a starting number below one million is sixty terms.</p>
|
||||
<p>How many chains, with a starting number below one million, contain exactly sixty non-repeating terms?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
79
project_euler/pe/p075.html
Normal file
79
project_euler/pe/p075.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 75 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=427d4"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Singular integer right triangles</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 75</h3><span style="width:300px;color:#666;">Published on Friday, 30th July 2004, 06:00 pm; Solved by 8053</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>It turns out that 12 cm is the smallest length of wire that can be bent to form an integer sided right angle triangle in exactly one way, but there are many more examples.</p>
|
||||
<p style='margin-left:50px;'><b>12 cm</b>: (3,4,5)<br />
|
||||
<b>24 cm</b>: (6,8,10)<br />
|
||||
<b>30 cm</b>: (5,12,13)<br />
|
||||
<b>36 cm</b>: (9,12,15)<br />
|
||||
<b>40 cm</b>: (8,15,17)<br />
|
||||
<b>48 cm</b>: (12,16,20)</p>
|
||||
<p>In contrast, some lengths of wire, like 20 cm, cannot be bent to form an integer sided right angle triangle, and other lengths allow more than one solution to be found; for example, using 120 cm it is possible to form exactly three different integer sided right angle triangles.</p>
|
||||
<p style='margin-left:50px;'><b>120 cm</b>: (30,40,50), (20,48,52), (24,45,51)</p>
|
||||
<p>Given that L is the length of the wire, for how many values of L <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 1,500,000 can exactly one integer sided right angle triangle be formed?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
78
project_euler/pe/p076.html
Normal file
78
project_euler/pe/p076.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 76 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=d276e"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Counting summations</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 76</h3><span style="width:300px;color:#666;">Published on Friday, 13th August 2004, 06:00 pm; Solved by 13732</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>It is possible to write five as a sum in exactly six different ways:</p>
|
||||
<p style='margin-left:50px;'>4 + 1<br />
|
||||
3 + 2<br />
|
||||
3 + 1 + 1<br />
|
||||
2 + 2 + 1<br />
|
||||
2 + 1 + 1 + 1<br />
|
||||
1 + 1 + 1 + 1 + 1</p>
|
||||
<p>How many different ways can one hundred be written as a sum of at least two positive integers?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
77
project_euler/pe/p077.html
Normal file
77
project_euler/pe/p077.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 77 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=b3b39"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Prime summations</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 77</h3><span style="width:300px;color:#666;">Published on Friday, 27th August 2004, 06:00 pm; Solved by 8433</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>It is possible to write ten as the sum of primes in exactly five different ways:</p>
|
||||
<p style='margin-left:50px;'>7 + 3<br />
|
||||
5 + 5<br />
|
||||
5 + 3 + 2<br />
|
||||
3 + 3 + 2 + 2<br />
|
||||
2 + 2 + 2 + 2 + 2</p>
|
||||
<p>What is the first value which can be written as the sum of primes in over five thousand different ways?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
96
project_euler/pe/p078.html
Normal file
96
project_euler/pe/p078.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 78 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=3c831"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Coin partitions</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 78</h3><span style="width:300px;color:#666;">Published on Friday, 10th September 2004, 06:00 pm; Solved by 7384</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Let p(<i>n</i>) represent the number of different ways in which <i>n</i> coins can be separated into piles. For example, five coins can separated into piles in exactly seven different ways, so p(5)=7.</p>
|
||||
<div style='text-align:center;'>
|
||||
<table cellspacing='0' cellpadding='10'>
|
||||
<tr>
|
||||
<td>OOOOO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OOOO O</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OOO OO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OOO O O</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OO OO O</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OO O O O</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>O O O O O</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>Find the least value of <i>n</i> for which p(<i>n</i>) is divisible by one million.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p079.html
Normal file
72
project_euler/pe/p079.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 79 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=64b05"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Passcode derivation</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 79</h3><span style="width:300px;color:#666;">Published on Friday, 17th September 2004, 06:00 pm; Solved by 23211</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>A common security method used for online banking is to ask the user for three random characters from a passcode. For example, if the passcode was 531278, they may ask for the 2nd, 3rd, and 5th characters; the expected reply would be: 317.</p>
|
||||
<p>The text file, <a href='project/keylog.txt'>keylog.txt</a>, contains fifty successful login attempts.</p>
|
||||
<p>Given that the three characters are always asked for in order, analyse the file so as to determine the shortest possible secret passcode of unknown length.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p080.html
Normal file
73
project_euler/pe/p080.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 80 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=ebcc5"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Square root digital expansion</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 80</h3><span style="width:300px;color:#666;">Published on Friday, 8th October 2004, 06:00 pm; Solved by 9182</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>It is well known that if the square root of a natural number is not an integer, then it is irrational. The decimal expansion of such square roots is infinite without any repeating pattern at all.</p>
|
||||
<p>The square root of two is 1.41421356237309504880..., and the digital sum of the first one hundred decimal digits is 475.</p>
|
||||
<p>For the first one hundred natural numbers, find the total of the digital sums of the first one hundred decimal digits for all the irrational square roots.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
98
project_euler/pe/p081.html
Normal file
98
project_euler/pe/p081.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 81 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=90745"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Path sum: two ways</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 81</h3><span style="width:300px;color:#666;">Published on Friday, 22nd October 2004, 06:00 pm; Solved by 16303</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>In the 5 by 5 matrix below, the minimal path sum from the top left to the bottom right, by <b>only moving to the right and down</b>, is indicated in bold red and is equal to 2427.</p>
|
||||
<div style='text-align:center;'>
|
||||
<table cellpadding='0' cellspacing='0' border='0' align='center'>
|
||||
<tr>
|
||||
<td><img src='images/bracket_left.gif' width='8' height='120' alt='' align='middle' /><br /></td>
|
||||
<td>
|
||||
<table cellpadding='3' cellspacing='0' border='0'>
|
||||
<tr>
|
||||
<td><span style='color:#dd0000;'><b>131</b></span></td><td>673</td><td>234</td><td>103</td><td>18</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span style='color:#dd0000;'><b>201</b></span></td><td><span style='color:#dd0000;'><b>96</b></span></td><td><span style='color:#dd0000;'><b>342</b></span></td><td>965</td><td>150</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>630</td><td>803</td><td><span style='color:#dd0000;'><b>746</b></span></td><td><span style='color:#dd0000;'><b>422</b></span></td><td>111</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>537</td><td>699</td><td>497</td><td><span style='color:#dd0000;'><b>121</b></span></td><td>956</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>805</td><td>732</td><td>524</td><td><span style='color:#dd0000;'><b>37</b></span></td><td><span style='color:#dd0000;'><b>331</b></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td><img src='images/bracket_right.gif' width='8' height='120' alt='' align='middle' /><br /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>Find the minimal path sum, in <a href='project/matrix.txt'>matrix.txt</a> (right click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix, from the top left to the bottom right by only moving right and down.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
99
project_euler/pe/p082.html
Normal file
99
project_euler/pe/p082.html
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 82 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=24e92"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Path sum: three ways</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 82</h3><span style="width:300px;color:#666;">Published on Friday, 5th November 2004, 06:00 pm; Solved by 9788</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p class='info'>NOTE: This problem is a more challenging version of <a href='index.php?section=problems&id=81'>Problem 81</a>.</p>
|
||||
<p>The minimal path sum in the 5 by 5 matrix below, by starting in any cell in the left column and finishing in any cell in the right column, and only moving up, down, and right, is indicated in red and bold; the sum is equal to 994.</p>
|
||||
<div style='text-align:center;'>
|
||||
<table cellpadding='0' cellspacing='0' border='0' align='center'>
|
||||
<tr>
|
||||
<td><img src='images/bracket_left.gif' width='8' height='120' alt='' align='middle' /><br /></td>
|
||||
<td>
|
||||
<table cellpadding='3' cellspacing='0' border='0'>
|
||||
<tr>
|
||||
<td>131</td><td>673</td><td><span style='color:#dd0000;'><b>234</b></span></td><td><span style='color:#dd0000;'><b>103</b></span></td><td><span style='color:#dd0000;'><b>18</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span style='color:#dd0000;'><b>201</b></span></td><td><span style='color:#dd0000;'><b>96</b></span></td><td><span style='color:#dd0000;'><b>342</b></span></td><td>965</td><td>150</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>630</td><td>803</td><td>746</td><td>422</td><td>111</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>537</td><td>699</td><td>497</td><td>121</td><td>956</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>805</td><td>732</td><td>524</td><td>37</td><td>331</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td><img src='images/bracket_right.gif' width='8' height='120' alt='' align='middle' /><br /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>Find the minimal path sum, in <a href='project/matrix.txt'>matrix.txt</a> (right click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix, from the left column to the right column.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
99
project_euler/pe/p083.html
Normal file
99
project_euler/pe/p083.html
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 83 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=7e57d"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Path sum: four ways</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 83</h3><span style="width:300px;color:#666;">Published on Friday, 19th November 2004, 06:00 pm; Solved by 8260</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p class='info'>NOTE: This problem is a significantly more challenging version of <a href='index.php?section=problems&id=81'>Problem 81</a>.</p>
|
||||
<p>In the 5 by 5 matrix below, the minimal path sum from the top left to the bottom right, by moving left, right, up, and down, is indicated in bold red and is equal to 2297.</p>
|
||||
<div style='text-align:center;'>
|
||||
<table cellpadding='0' cellspacing='0' border='0' align='center'>
|
||||
<tr>
|
||||
<td><img src='images/bracket_left.gif' width='8' height='120' alt='' align='middle' /><br /></td>
|
||||
<td>
|
||||
<table cellpadding='3' cellspacing='0' border='0'>
|
||||
<tr>
|
||||
<td><span style='color:#dd0000;'><b>131</b></span></td><td>673</td><td><span style='color:#dd0000;'><b>234</b></span></td><td><span style='color:#dd0000;'><b>103</b></span></td><td><span style='color:#dd0000;'><b>18</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span style='color:#dd0000;'><b>201</b></span></td><td><span style='color:#dd0000;'><b>96</b></span></td><td><span style='color:#dd0000;'><b>342</b</span></td><td>965</td><td><span style='color:#dd0000;'><b>150</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>630</td><td>803</td><td>746</td><td><span style='color:#dd0000;'><b>422</b></span></td><td><span style='color:#dd0000;'><b>111</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>537</td><td>699</td><td>497</td><td><span style='color:#dd0000;'><b>121</b></span></td><td>956</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>805</td><td>732</td><td>524</td><td><span style='color:#dd0000;'><b>37</b></span></td><td><span style='color:#dd0000;'><b>331</b></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td><img src='images/bracket_right.gif' width='8' height='120' alt='' align='middle' /><br /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>Find the minimal path sum, in <a href='project/matrix.txt'>matrix.txt</a> (right click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix, from the top left to the bottom right by moving left, right, up, and down.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
174
project_euler/pe/p084.html
Normal file
174
project_euler/pe/p084.html
Normal file
@@ -0,0 +1,174 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 84 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=0fa1d"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Monopoly odds</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 84</h3><span style="width:300px;color:#666;">Published on Friday, 3rd December 2004, 06:00 pm; Solved by 5619</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>In the game, <i>Monopoly</i>, the standard board is set up in the following way:</p>
|
||||
<div style='text-align:center;'>
|
||||
<table cellspacing='1' cellpadding='5' border='0' style='background-color:#333333;' align='center'>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>GO</td>
|
||||
<td style='background-color:#ffffff;'>A1</td>
|
||||
<td style='background-color:#ffffff;'>CC1</td>
|
||||
<td style='background-color:#ffffff;'>A2</td>
|
||||
<td style='background-color:#ffffff;'>T1</td>
|
||||
<td style='background-color:#ffffff;'>R1</td>
|
||||
<td style='background-color:#ffffff;'>B1</td>
|
||||
<td style='background-color:#ffffff;'>CH1</td>
|
||||
<td style='background-color:#ffffff;'>B2</td>
|
||||
<td style='background-color:#ffffff;'>B3</td>
|
||||
<td style='background-color:#ffffff;'>JAIL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>H2</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>C1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>T2</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>U1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>H1</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>C2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>CH3</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>C3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>R4</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>R2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>G3</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>D1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>CC3</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>CC2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>G2</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>D2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>G1</td>
|
||||
<td colspan='9'> </td>
|
||||
<td style='background-color:#ffffff;'>D3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='background-color:#ffffff;'>G2J</td>
|
||||
<td style='background-color:#ffffff;'>F3</td>
|
||||
<td style='background-color:#ffffff;'>U2</td>
|
||||
<td style='background-color:#ffffff;'>F2</td>
|
||||
<td style='background-color:#ffffff;'>F1</td>
|
||||
<td style='background-color:#ffffff;'>R3</td>
|
||||
<td style='background-color:#ffffff;'>E3</td>
|
||||
<td style='background-color:#ffffff;'>E2</td>
|
||||
<td style='background-color:#ffffff;'>CH2</td>
|
||||
<td style='background-color:#ffffff;'>E1</td>
|
||||
<td style='background-color:#ffffff;'>FP</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>A player starts on the GO square and adds the scores on two 6-sided dice to determine the number of squares they advance in a clockwise direction. Without any further rules we would expect to visit each square with equal probability: 2.5%. However, landing on G2J (Go To Jail), CC (community chest), and CH (chance) changes this distribution.</p>
|
||||
<p>In addition to G2J, and one card from each of CC and CH, that orders the player to go directly to jail, if a player rolls three consecutive doubles, they do not advance the result of their 3rd roll. Instead they proceed directly to jail.</p>
|
||||
<p>At the beginning of the game, the CC and CH cards are shuffled. When a player lands on CC or CH they take a card from the top of the respective pile and, after following the instructions, it is returned to the bottom of the pile. There are sixteen cards in each pile, but for the purpose of this problem we are only concerned with cards that order a movement; any instruction not concerned with movement will be ignored and the player will remain on the CC/CH square.</p>
|
||||
<ul>
|
||||
<li>Community Chest (2/16 cards):
|
||||
<ol>
|
||||
<li>Advance to GO</li>
|
||||
<li>Go to JAIL</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>Chance (10/16 cards):
|
||||
<ol>
|
||||
<li>Advance to GO</li>
|
||||
<li>Go to JAIL</li>
|
||||
<li>Go to C1</li>
|
||||
<li>Go to E3</li>
|
||||
<li>Go to H2</li>
|
||||
<li>Go to R1</li>
|
||||
<li>Go to next R (railway company)</li>
|
||||
<li>Go to next R</li>
|
||||
<li>Go to next U (utility company)</li>
|
||||
<li>Go back 3 squares.</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The heart of this problem concerns the likelihood of visiting a particular square. That is, the probability of finishing at that square after a roll. For this reason it should be clear that, with the exception of G2J for which the probability of finishing on it is zero, the CH squares will have the lowest probabilities, as 5/8 request a movement to another square, and it is the final square that the player finishes at on each roll that we are interested in. We shall make no distinction between "Just Visiting" and being sent to JAIL, and we shall also ignore the rule about requiring a double to "get out of jail", assuming that they pay to get out on their next turn.</p>
|
||||
<p>By starting at GO and numbering the squares sequentially from 00 to 39 we can concatenate these two-digit numbers to produce strings that correspond with sets of squares.</p>
|
||||
<p>Statistically it can be shown that the three most popular squares, in order, are JAIL (6.24%) = Square 10, E3 (3.18%) = Square 24, and GO (3.09%) = Square 00. So these three most popular squares can be listed with the six-digit modal string: 102400.</p>
|
||||
<p>If, instead of using two 6-sided dice, two 4-sided dice are used, find the six-digit modal string.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p085.html
Normal file
74
project_euler/pe/p085.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 85 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=08bf7"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Counting rectangles</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 85</h3><span style="width:300px;color:#666;">Published on Friday, 17th December 2004, 06:00 pm; Solved by 11743</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>By counting carefully it can be seen that a rectangular grid measuring 3 by 2 contains eighteen rectangles:</p>
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_085.gif" alt="" />
|
||||
</div>
|
||||
<p>Although there exists no rectangular grid that contains exactly two million rectangles, find the area of the grid with the nearest solution.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
76
project_euler/pe/p086.html
Normal file
76
project_euler/pe/p086.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 86 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=731a1"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Cuboid route</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 86</h3><span style="width:300px;color:#666;">Published on Friday, 7th January 2005, 06:00 pm; Solved by 5662</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>A spider, S, sits in one corner of a cuboid room, measuring 6 by 5 by 3, and a fly, F, sits in the opposite corner. By travelling on the surfaces of the room the shortest "straight line" distance from S to F is 10 and the path is shown on the diagram.</p>
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_086.gif" alt="" /><br />
|
||||
</div>
|
||||
<p>However, there are up to three "shortest" path candidates for any given cuboid and the shortest route doesn't always have integer length.</p>
|
||||
<p>By considering all cuboid rooms with integer dimensions, up to a maximum size of M by M by M, there are exactly 2060 cuboids for which the shortest route has integer length when M=100, and this is the least value of M for which the number of solutions first exceeds two thousand; the number of solutions is 1975 when M=99.</p>
|
||||
<p>Find the least value of M such that the number of solutions first exceeds one million.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
76
project_euler/pe/p087.html
Normal file
76
project_euler/pe/p087.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 87 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=157ec"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Prime power triples</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 87</h3><span style="width:300px;color:#666;">Published on Friday, 21st January 2005, 06:00 pm; Solved by 9590</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28. In fact, there are exactly four numbers below fifty that can be expressed in such a way:</p>
|
||||
<p style='margin-left:50px;'>28 = 2<sup>2</sup> + 2<sup>3</sup> + 2<sup>4</sup><br />
|
||||
33 = 3<sup>2</sup> + 2<sup>3</sup> + 2<sup>4</sup><br />
|
||||
49 = 5<sup>2</sup> + 2<sup>3</sup> + 2<sup>4</sup><br />
|
||||
47 = 2<sup>2</sup> + 3<sup>3</sup> + 2<sup>4</sup></p>
|
||||
<p>How many numbers below fifty million can be expressed as the sum of a prime square, prime cube, and prime fourth power?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
81
project_euler/pe/p088.html
Normal file
81
project_euler/pe/p088.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 88 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=6d463"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Product-sum numbers</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 88</h3><span style="width:300px;color:#666;">Published on Friday, 4th February 2005, 06:00 pm; Solved by 4144</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>A natural number, N, that can be written as the sum and product of a given set of at least two natural numbers, {<i>a</i><sub>1</sub>, <i>a</i><sub>2</sub>, ... , <i>a</i><sub><i>k</i></sub>} is called a product-sum number: N = <i>a</i><sub>1</sub> + <i>a</i><sub>2</sub> + ... + <i>a</i><sub><i>k</i></sub> = <i>a</i><sub>1</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>a</i><sub>2</sub> <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> ... <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> <i>a</i><sub><i>k</i></sub>.</p>
|
||||
<p>For example, 6 = 1 + 2 + 3 = 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 3.</p>
|
||||
<p>For a given set of size, <i>k</i>, we shall call the smallest N with this property a minimal product-sum number. The minimal product-sum numbers for sets of size, <i>k</i> = 2, 3, 4, 5, and 6 are as follows.</p>
|
||||
<p style='margin-left:50px;'><i>k</i>=2: 4 = 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 = 2 + 2<br />
|
||||
<i>k</i>=3: 6 = 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 3 = 1 + 2 + 3<br />
|
||||
<i>k</i>=4: 8 = 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 4 = 1 + 1 + 2 + 4<br />
|
||||
<i>k</i>=5: 8 = 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 = 1 + 1 + 2 + 2 + 2<br />
|
||||
<i>k</i>=6: 12 = 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 1 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 2 <img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' /> 6 = 1 + 1 + 1 + 1 + 2 + 6</p>
|
||||
<p>Hence for 2<img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /><i>k</i><img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' />6, the sum of all the minimal product-sum numbers is 4+6+8+12 = 30; note that 8 is only counted once in the sum.</p>
|
||||
<p>In fact, as the complete set of minimal product-sum numbers for 2<img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /><i>k</i><img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' />12 is {4, 6, 8, 12, 15, 16}, the sum is 61.</p>
|
||||
<p>What is the sum of all the minimal product-sum numbers for 2<img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /><i>k</i><img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' />12000?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
81
project_euler/pe/p089.html
Normal file
81
project_euler/pe/p089.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 89 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=45208"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Roman numerals</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 89</h3><span style="width:300px;color:#666;">Published on Friday, 18th February 2005, 06:00 pm; Solved by 10114</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The rules for writing Roman numerals allow for many ways of writing each number (see <a href="about=roman_numerals">About Roman Numerals...</a>). However, there is always a "best" way of writing a particular number.</p>
|
||||
<p>For example, the following represent all of the legitimate ways of writing the number sixteen:</p>
|
||||
<p style="margin-left:50px;font-family:courier new,monospace;">IIIIIIIIIIIIIIII<br />
|
||||
VIIIIIIIIIII<br />
|
||||
VVIIIIII<br />
|
||||
XIIIIII<br />
|
||||
VVVI<br />
|
||||
XVI</p>
|
||||
<p>The last example being considered the most efficient, as it uses the least number of numerals.</p>
|
||||
<p>The 11K text file, <a href="project/roman.txt">roman.txt</a> (right click and 'Save Link/Target As...'), contains one thousand numbers written in valid, but not necessarily minimal, Roman numerals; that is, they are arranged in descending units and obey the subtractive pair rule (see <a href="about=roman_numerals">About Roman Numerals...</a> for the definitive rules for this problem).</p>
|
||||
<p>Find the number of characters saved by writing each of these in their minimal form.</p>
|
||||
<p class="info">Note: You can assume that all the Roman numerals in the file contain no more than four consecutive identical units.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
90
project_euler/pe/p090.html
Normal file
90
project_euler/pe/p090.html
Normal file
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 90 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=97c7e"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Cube digit pairs</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 90</h3><span style="width:300px;color:#666;">Published on Friday, 4th March 2005, 06:00 pm; Solved by 4866</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Each of the six faces on a cube has a different digit (0 to 9) written on it; the same is done to a second cube. By placing the two cubes side-by-side in different positions we can form a variety of 2-digit numbers.</p>
|
||||
|
||||
<p>For example, the square number 64 could be formed:</p>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_090.gif" alt="" /><br />
|
||||
</div>
|
||||
|
||||
<p>In fact, by carefully choosing the digits on both cubes it is possible to display all of the square numbers below one-hundred: 01, 04, 09, 16, 25, 36, 49, 64, and 81.</p>
|
||||
|
||||
<p>For example, one way this can be achieved is by placing {0, 5, 6, 7, 8, 9} on one cube and {1, 2, 3, 4, 8, 9} on the other cube.</p>
|
||||
|
||||
<p>However, for this problem we shall allow the 6 or 9 to be turned upside-down so that an arrangement like {0, 5, 6, 7, 8, 9} and {1, 2, 3, 4, 6, 7} allows for all nine square numbers to be displayed; otherwise it would be impossible to obtain 09.</p>
|
||||
|
||||
<p>In determining a distinct arrangement we are interested in the digits on each cube, not the order.</p>
|
||||
|
||||
<p style="margin-left:50px;">{1, 2, 3, 4, 5, 6} is equivalent to {3, 6, 4, 1, 2, 5}<br />
|
||||
{1, 2, 3, 4, 5, 6} is distinct from {1, 2, 3, 4, 5, 9}</p>
|
||||
|
||||
<p>But because we are allowing 6 and 9 to be reversed, the two distinct sets in the last example both represent the extended set {1, 2, 3, 4, 5, 6, 9} for the purpose of forming 2-digit numbers.</p>
|
||||
|
||||
<p>How many distinct arrangements of the two cubes allow for all of the square numbers to be displayed?</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
81
project_euler/pe/p091.html
Normal file
81
project_euler/pe/p091.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 91 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=0cf5c"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Right triangles with integer coordinates</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 91</h3><span style="width:300px;color:#666;">Published on Friday, 18th March 2005, 06:00 pm; Solved by 7165</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The points P (<i>x</i><sub>1</sub>, <i>y</i><sub>1</sub>) and Q (<i>x</i><sub>2</sub>, <i>y</i><sub>2</sub>) are plotted at integer co-ordinates and are joined to the origin, O(0,0), to form ΔOPQ.</p>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_091_1.gif" alt="" /><br />
|
||||
</div>
|
||||
|
||||
<p>There are exactly fourteen triangles containing a right angle that can be formed when each co-ordinate lies between 0 and 2 inclusive; that is,<br />0 <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <i>x</i><sub>1</sub>, <i>y</i><sub>1</sub>, <i>x</i><sub>2</sub>, <i>y</i><sub>2</sub> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 2.</p>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<img src="project/images/p_091_2.gif" alt="" /><br />
|
||||
</div>
|
||||
|
||||
<p>Given that 0 <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> <i>x</i><sub>1</sub>, <i>y</i><sub>1</sub>, <i>x</i><sub>2</sub>, <i>y</i><sub>2</sub> <img src='images/symbol_le.gif' width='10' height='12' alt='≤' border='0' style='vertical-align:middle;' /> 50, how many right triangles can be formed?</p>
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
76
project_euler/pe/p092.html
Normal file
76
project_euler/pe/p092.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 92 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=a4fc3"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Square digit chains</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 92</h3><span style="width:300px;color:#666;">Published on Friday, 1st April 2005, 06:00 pm; Solved by 19600</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before.</p>
|
||||
<p>For example,</p>
|
||||
<p style='margin-left:50px;'>44 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 32 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 13 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 10 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> <b>1</b> <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> <b>1</b><br />
|
||||
85 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> <b>89</b> <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 145 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 42 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 20 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 4 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 16 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 37 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 58 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> <b>89</b></p>
|
||||
<p>Therefore any chain that arrives at 1 or 89 will become stuck in an endless loop. What is most amazing is that EVERY starting number will eventually arrive at 1 or 89.</p>
|
||||
<p>How many starting numbers below ten million will arrive at 89?</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
79
project_euler/pe/p093.html
Normal file
79
project_euler/pe/p093.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 93 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=db5dd"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Arithmetic expressions</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 93</h3><span style="width:300px;color:#666;">Published on Friday, 15th April 2005, 06:00 pm; Solved by 5099</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>By using each of the digits from the set, {1, 2, 3, 4}, exactly once, and making use of the four arithmetic operations (+, <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />, *, /) and brackets/parentheses, it is possible to form different positive integer targets.</p>
|
||||
<p>For example,</p>
|
||||
<p style='margin-left:50px;font-family:courier new;'>8 = (4 * (1 + 3)) / 2<br />
|
||||
14 = 4 * (3 + 1 / 2)<br />
|
||||
19 = 4 * (2 + 3) <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' /> 1<br />
|
||||
36 = 3 * 4 * (2 + 1)</p>
|
||||
<p>Note that concatenations of the digits, like 12 + 34, are not allowed.</p>
|
||||
<p>Using the set, {1, 2, 3, 4}, it is possible to obtain thirty-one different target numbers of which 36 is the maximum, and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number.</p>
|
||||
<p>Find the set of four distinct digits, <i>a</i> <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> <i>b</i> < <i>c</i> <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> <i>d</i>, for which the longest set of consecutive positive integers, 1 to <i>n</i>, can be obtained, giving your answer as a string: <i>abcd</i>.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p094.html
Normal file
72
project_euler/pe/p094.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 94 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=e2234"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Almost equilateral triangles</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 94</h3><span style="width:300px;color:#666;">Published on Friday, 29th April 2005, 06:00 pm; Solved by 5348</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>It is easily proved that no equilateral triangle exists with integral length sides and integral area. However, the <i>almost equilateral triangle</i> 5-5-6 has an area of 12 square units.</p>
|
||||
<p>We shall define an <i>almost equilateral triangle</i> to be a triangle for which two sides are equal and the third differs by no more than one unit.</p>
|
||||
<p>Find the sum of the perimeters of all <i>almost equilateral triangles</i> with integral side lengths and area and whose perimeters do not exceed one billion (1,000,000,000).</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
75
project_euler/pe/p095.html
Normal file
75
project_euler/pe/p095.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 95 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=2654c"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Amicable chains</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 95</h3><span style="width:300px;color:#666;">Published on Friday, 13th May 2005, 06:00 pm; Solved by 6321</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The proper divisors of a number are all the divisors excluding the number itself. For example, the proper divisors of 28 are 1, 2, 4, 7, and 14. As the sum of these divisors is equal to 28, we call it a perfect number.</p>
|
||||
<p>Interestingly the sum of the proper divisors of 220 is 284 and the sum of the proper divisors of 284 is 220, forming a chain of two numbers. For this reason, 220 and 284 are called an amicable pair.</p>
|
||||
<p>Perhaps less well known are longer chains. For example, starting with 12496, we form a chain of five numbers:</p>
|
||||
<p style='text-align:center;'>12496 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 14288 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 15472 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 14536 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 14264 (<img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> 12496 <img src='images/symbol_maps.gif' width='15' height='7' alt='→' border='0' style='vertical-align:middle;' /> ...)</p>
|
||||
<p>Since this chain returns to its starting point, it is called an amicable chain.</p>
|
||||
<p>Find the smallest member of the longest amicable chain with no element exceeding one million.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
120
project_euler/pe/p096.html
Normal file
120
project_euler/pe/p096.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 96 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=f86ef"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Su Doku</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 96</h3><span style="width:300px;color:#666;">Published on Friday, 27th May 2005, 06:00 pm; Solved by 7757</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>Su Doku (Japanese meaning <i>number place</i>) is the name given to a popular puzzle concept. Its origin is unclear, but credit must be attributed to Leonhard Euler who invented a similar, and much more difficult, puzzle idea called Latin Squares. The objective of Su Doku puzzles, however, is to replace the blanks (or zeros) in a 9 by 9 grid in such that each row, column, and 3 by 3 box contains each of the digits 1 to 9. Below is an example of a typical starting puzzle grid and its solution grid.</p>
|
||||
<div style='text-align:center;'>
|
||||
<table border='0' cellpadding='0' cellspacing='0' align='center'>
|
||||
<tr>
|
||||
<td>
|
||||
<table cellpadding='5' cellspacing='0' border='1'>
|
||||
<tr>
|
||||
<td style='font-family:courier new;font-size:14pt;'>0 0 3<br />9 0 0<br />0 0 1</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>0 2 0<br />3 0 5<br />8 0 6</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>6 0 0<br />0 0 1<br />4 0 0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='font-family:courier new;font-size:14pt;'>0 0 8<br />7 0 0<br />0 0 6</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>1 0 2<br />0 0 0<br />7 0 8</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>9 0 0<br />0 0 8<br />2 0 0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='font-family:courier new;font-size:14pt;'>0 0 2<br />8 0 0<br />0 0 5</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>6 0 9<br />2 0 3<br />0 1 0</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>5 0 0<br />0 0 9<br />3 0 0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width='50'><img src='images/spacer.gif' width='50' height='1' alt='' /><br /></td>
|
||||
<td>
|
||||
<table cellpadding='5' cellspacing='0' border='1'>
|
||||
<tr>
|
||||
<td style='font-family:courier new;font-size:14pt;'>4 8 3<br />9 6 7<br />2 5 1</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>9 2 1<br />3 4 5<br />8 7 6</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>6 5 7<br />8 2 1<br />4 9 3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='font-family:courier new;font-size:14pt;'>5 4 8<br />7 2 9<br />1 3 6</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>1 3 2<br />5 6 4<br />7 9 8</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>9 7 6<br />1 3 8<br />2 4 5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='font-family:courier new;font-size:14pt;'>3 7 2<br />8 1 4<br />6 9 5</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>6 8 9<br />2 5 3<br />4 1 7</td>
|
||||
<td style='font-family:courier new;font-size:14pt;'>5 1 4<br />7 6 9<br />3 8 2</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p>A well constructed Su Doku puzzle has a unique solution and can be solved by logic, although it may be necessary to employ "guess and test" methods in order to eliminate options (there is much contested opinion over this). The complexity of the search determines the difficulty of the puzzle; the example above is considered <i>easy</i> because it can be solved by straight forward direct deduction.</p>
|
||||
<p>The 6K text file, <a href='project/sudoku.txt'>sudoku.txt</a> (right click and 'Save Link/Target As...'), contains fifty different Su Doku puzzles ranging in difficulty, but all with unique solutions (the first puzzle in the file is the example above).</p>
|
||||
<p>By solving all fifty puzzles find the sum of the 3-digit numbers found in the top left corner of each solution grid; for example, 483 is the 3-digit number found in the top left corner of the solution grid above.</p>
|
||||
<!--<p class='info'>Note: If you're convinced that "guess and test" methods need not be employed please tell how you would solve #6 and #46. (c;</p>-->
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
72
project_euler/pe/p097.html
Normal file
72
project_euler/pe/p097.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 97 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=8cfbd"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Large non-Mersenne prime</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 97</h3><span style="width:300px;color:#666;">Published on Friday, 10th June 2005, 06:00 pm; Solved by 24662</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>The first known prime found to exceed one million digits was discovered in 1999, and is a Mersenne prime of the form 2<sup>6972593</sup><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1; it contains exactly 2,098,960 digits. Subsequently other Mersenne primes, of the form 2<sup><i>p</i></sup><img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' />1, have been found which contain more digits.</p>
|
||||
<p>However, in 2004 there was found a massive non-Mersenne prime which contains 2,357,207 digits: 28433<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />2<sup>7830457</sup>+1.</p>
|
||||
<p>Find the last ten digits of this prime number.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p098.html
Normal file
73
project_euler/pe/p098.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 98 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=33070"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Anagramic squares</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 98</h3><span style="width:300px;color:#666;">Published on Friday, 17th June 2005, 06:00 pm; Solved by 4890</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
<p>By replacing each of the letters in the word CARE with 1, 2, 9, and 6 respectively, we form a square number: 1296 = 36<sup>2</sup>. What is remarkable is that, by using the same digital substitutions, the anagram, RACE, also forms a square number: 9216 = 96<sup>2</sup>. We shall call CARE (and RACE) a square anagram word pair and specify further that leading zeroes are not permitted, neither may a different letter have the same digital value as another letter.</p>
|
||||
<p>Using <a href='project/words.txt'>words.txt</a> (right click and 'Save Link/Target As...'), a 16K text file containing nearly two-thousand common English words, find all the square anagram word pairs (a palindromic word is NOT considered to be an anagram of itself).</p>
|
||||
<p>What is the largest square number formed by any member of such a pair?</p>
|
||||
<p class='info'>NOTE: All anagrams formed must be contained in the given text file.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
74
project_euler/pe/p099.html
Normal file
74
project_euler/pe/p099.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 99 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=fb842"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Largest exponential</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 99</h3><span style="width:300px;color:#666;">Published on Friday, 1st July 2005, 06:00 pm; Solved by 14678</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>Comparing two numbers written in index form like 2<sup>11</sup> and 3<sup>7</sup> is not difficult, as any calculator would confirm that 2<sup>11</sup> = 2048 <img src='images/symbol_lt.gif' width='10' height='10' alt='<' border='0' style='vertical-align:middle;' /> 3<sup>7</sup> = 2187.</p>
|
||||
<p>However, confirming that 632382<sup>518061</sup> <img src='images/symbol_gt.gif' width='10' height='10' alt='>' border='0' style='vertical-align:middle;' /> 519432<sup>525806</sup> would be much more difficult, as both numbers contain over three million digits.</p>
|
||||
<p>Using <a href='project/base_exp.txt'>base_exp.txt</a> (right click and 'Save Link/Target As...'), a 22K text file containing one thousand lines with a base/exponent pair on each line, determine which line number has the greatest numerical value.</p>
|
||||
<p class='info'>NOTE: The first two lines in the file represent the numbers in the example given above.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
73
project_euler/pe/p100.html
Normal file
73
project_euler/pe/p100.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 100 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=3b1b2"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Arranged probability</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 100</h3><span style="width:300px;color:#666;">Published on Friday, 15th July 2005, 06:00 pm; Solved by 7116</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were taken at random, it can be seen that the probability of taking two blue discs, P(BB) = (15/21)<img src='images/symbol_times.gif' width='9' height='9' alt='×' border='0' style='vertical-align:middle;' />(14/20) = 1/2.</p>
|
||||
<p>The next such arrangement, for which there is exactly 50% chance of taking two blue discs at random, is a box containing eighty-five blue discs and thirty-five red discs.</p>
|
||||
<p>By finding the first arrangement to contain over 10<sup>12</sup> = 1,000,000,000,000 discs in total, determine the number of blue discs that the box would contain.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user