euler-manager 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/data/images/sod_13.gif +4 -0
  4. data/data/problems/100.yml +1 -1
  5. data/data/problems/101.yml +16 -16
  6. data/data/problems/102.yml +2 -3
  7. data/data/problems/103.yml +16 -16
  8. data/data/problems/105.yml +2 -2
  9. data/data/problems/106.yml +2 -2
  10. data/data/problems/107.yml +15 -15
  11. data/data/problems/108.yml +13 -16
  12. data/data/problems/109.yml +16 -17
  13. data/data/problems/11.yml +22 -23
  14. data/data/problems/110.yml +9 -10
  15. data/data/problems/114.yml +30 -41
  16. data/data/problems/116.yml +19 -25
  17. data/data/problems/117.yml +24 -33
  18. data/data/problems/120.yml +3 -3
  19. data/data/problems/122.yml +18 -20
  20. data/data/problems/123.yml +2 -2
  21. data/data/problems/124.yml +18 -23
  22. data/data/problems/126.yml +10 -11
  23. data/data/problems/127.yml +7 -7
  24. data/data/problems/128.yml +1 -1
  25. data/data/problems/130.yml +6 -7
  26. data/data/problems/131.yml +1 -1
  27. data/data/problems/132.yml +1 -1
  28. data/data/problems/134.yml +2 -2
  29. data/data/problems/135.yml +2 -2
  30. data/data/problems/136.yml +2 -2
  31. data/data/problems/137.yml +4 -4
  32. data/data/problems/138.yml +4 -4
  33. data/data/problems/139.yml +1 -1
  34. data/data/problems/14.yml +12 -13
  35. data/data/problems/140.yml +3 -3
  36. data/data/problems/142.yml +1 -1
  37. data/data/problems/143.yml +2 -2
  38. data/data/problems/144.yml +3 -3
  39. data/data/problems/147.yml +1 -1
  40. data/data/problems/149.yml +11 -13
  41. data/data/problems/15.yml +3 -3
  42. data/data/problems/150.yml +8 -8
  43. data/data/problems/151.yml +1 -1
  44. data/data/problems/152.yml +1 -1
  45. data/data/problems/153.yml +24 -26
  46. data/data/problems/154.yml +10 -9
  47. data/data/problems/155.yml +3 -3
  48. data/data/problems/156.yml +7 -8
  49. data/data/problems/157.yml +3 -4
  50. data/data/problems/158.yml +4 -5
  51. data/data/problems/159.yml +3 -3
  52. data/data/problems/161.yml +5 -4
  53. data/data/problems/163.yml +10 -10
  54. data/data/problems/165.yml +1 -1
  55. data/data/problems/166.yml +7 -7
  56. data/data/problems/167.yml +3 -4
  57. data/data/problems/168.yml +5 -5
  58. data/data/problems/170.yml +2 -2
  59. data/data/problems/171.yml +3 -3
  60. data/data/problems/173.yml +1 -1
  61. data/data/problems/174.yml +3 -3
  62. data/data/problems/175.yml +4 -4
  63. data/data/problems/177.yml +1 -1
  64. data/data/problems/179.yml +1 -1
  65. data/data/problems/180.yml +8 -9
  66. data/data/problems/182.yml +22 -24
  67. data/data/problems/183.yml +14 -15
  68. data/data/problems/184.yml +2 -2
  69. data/data/problems/186.yml +10 -11
  70. data/data/problems/187.yml +6 -8
  71. data/data/problems/189.yml +10 -9
  72. data/data/problems/190.yml +1 -1
  73. data/data/problems/192.yml +11 -12
  74. data/data/problems/194.yml +8 -8
  75. data/data/problems/195.yml +2 -2
  76. data/data/problems/197.yml +5 -6
  77. data/data/problems/198.yml +11 -12
  78. data/data/problems/199.yml +7 -7
  79. data/data/problems/20.yml +8 -10
  80. data/data/problems/202.yml +1 -1
  81. data/data/problems/207.yml +4 -4
  82. data/data/problems/208.yml +4 -5
  83. data/data/problems/21.yml +5 -6
  84. data/data/problems/210.yml +4 -5
  85. data/data/problems/211.yml +1 -1
  86. data/data/problems/212.yml +22 -26
  87. data/data/problems/213.yml +5 -6
  88. data/data/problems/214.yml +8 -9
  89. data/data/problems/215.yml +4 -4
  90. data/data/problems/216.yml +5 -5
  91. data/data/problems/217.yml +8 -10
  92. data/data/problems/218.yml +1 -1
  93. data/data/problems/22.yml +1 -1
  94. data/data/problems/220.yml +15 -15
  95. data/data/problems/221.yml +4 -5
  96. data/data/problems/223.yml +5 -6
  97. data/data/problems/224.yml +5 -6
  98. data/data/problems/226.yml +8 -8
  99. data/data/problems/228.yml +4 -5
  100. data/data/problems/229.yml +16 -16
  101. data/data/problems/230.yml +4 -4
  102. data/data/problems/231.yml +4 -5
  103. data/data/problems/233.yml +1 -1
  104. data/data/problems/234.yml +9 -10
  105. data/data/problems/236.yml +4 -4
  106. data/data/problems/237.yml +3 -3
  107. data/data/problems/238.yml +3 -4
  108. data/data/problems/241.yml +4 -4
  109. data/data/problems/242.yml +2 -2
  110. data/data/problems/243.yml +12 -12
  111. data/data/problems/244.yml +10 -11
  112. data/data/problems/245.yml +14 -15
  113. data/data/problems/246.yml +10 -9
  114. data/data/problems/247.yml +12 -13
  115. data/data/problems/251.yml +3 -3
  116. data/data/problems/252.yml +6 -7
  117. data/data/problems/254.yml +2 -2
  118. data/data/problems/255.yml +35 -36
  119. data/data/problems/256.yml +16 -20
  120. data/data/problems/257.yml +9 -9
  121. data/data/problems/258.yml +5 -6
  122. data/data/problems/26.yml +1 -1
  123. data/data/problems/260.yml +6 -8
  124. data/data/problems/261.yml +6 -7
  125. data/data/problems/262.yml +1 -1
  126. data/data/problems/264.yml +10 -11
  127. data/data/problems/265.yml +1 -1
  128. data/data/problems/27.yml +10 -11
  129. data/data/problems/270.yml +3 -3
  130. data/data/problems/271.yml +5 -6
  131. data/data/problems/272.yml +6 -7
  132. data/data/problems/273.yml +3 -3
  133. data/data/problems/274.yml +15 -15
  134. data/data/problems/275.yml +3 -3
  135. data/data/problems/276.yml +3 -3
  136. data/data/problems/277.yml +3 -3
  137. data/data/problems/278.yml +15 -17
  138. data/data/problems/281.yml +4 -4
  139. data/data/problems/282.yml +2 -2
  140. data/data/problems/284.yml +7 -8
  141. data/data/problems/287.yml +18 -17
  142. data/data/problems/288.yml +1 -1
  143. data/data/problems/289.yml +1 -1
  144. data/data/problems/29.yml +12 -13
  145. data/data/problems/290.yml +1 -1
  146. data/data/problems/291.yml +3 -3
  147. data/data/problems/292.yml +1 -1
  148. data/data/problems/293.yml +7 -7
  149. data/data/problems/295.yml +8 -8
  150. data/data/problems/296.yml +4 -5
  151. data/data/problems/297.yml +4 -5
  152. data/data/problems/299.yml +11 -12
  153. data/data/problems/300.yml +10 -9
  154. data/data/problems/301.yml +2 -2
  155. data/data/problems/303.yml +3 -3
  156. data/data/problems/304.yml +6 -7
  157. data/data/problems/305.yml +3 -2
  158. data/data/problems/306.yml +8 -11
  159. data/data/problems/307.yml +2 -3
  160. data/data/problems/309.yml +8 -8
  161. data/data/problems/31.yml +1 -1
  162. data/data/problems/310.yml +6 -7
  163. data/data/problems/311.yml +11 -11
  164. data/data/problems/312.yml +5 -5
  165. data/data/problems/313.yml +4 -4
  166. data/data/problems/314.yml +4 -5
  167. data/data/problems/315.yml +26 -27
  168. data/data/problems/316.yml +2 -4
  169. data/data/problems/318.yml +27 -34
  170. data/data/problems/319.yml +11 -12
  171. data/data/problems/32.yml +1 -1
  172. data/data/problems/320.yml +1 -1
  173. data/data/problems/321.yml +3 -3
  174. data/data/problems/322.yml +4 -4
  175. data/data/problems/323.yml +7 -8
  176. data/data/problems/324.yml +8 -9
  177. data/data/problems/325.yml +1 -1
  178. data/data/problems/326.yml +2 -2
  179. data/data/problems/327.yml +27 -29
  180. data/data/problems/328.yml +2 -2
  181. data/data/problems/330.yml +13 -14
  182. data/data/problems/331.yml +12 -12
  183. data/data/problems/332.yml +10 -9
  184. data/data/problems/333.yml +15 -16
  185. data/data/problems/334.yml +14 -14
  186. data/data/problems/335.yml +2 -2
  187. data/data/problems/336.yml +5 -4
  188. data/data/problems/337.yml +7 -7
  189. data/data/problems/338.yml +21 -24
  190. data/data/problems/340.yml +6 -7
  191. data/data/problems/341.yml +3 -5
  192. data/data/problems/342.yml +6 -7
  193. data/data/problems/343.yml +8 -12
  194. data/data/problems/344.yml +1 -1
  195. data/data/problems/347.yml +8 -8
  196. data/data/problems/350.yml +5 -5
  197. data/data/problems/351.yml +1 -1
  198. data/data/problems/352.yml +25 -26
  199. data/data/problems/353.yml +1 -1
  200. data/data/problems/354.yml +6 -6
  201. data/data/problems/356.yml +2 -3
  202. data/data/problems/358.yml +13 -14
  203. data/data/problems/359.yml +1 -1
  204. data/data/problems/361.yml +2 -1
  205. data/data/problems/362.yml +11 -13
  206. data/data/problems/363.yml +6 -6
  207. data/data/problems/364.yml +3 -3
  208. data/data/problems/365.yml +2 -2
  209. data/data/problems/366.yml +4 -5
  210. data/data/problems/369.yml +1 -1
  211. data/data/problems/370.yml +3 -3
  212. data/data/problems/372.yml +6 -8
  213. data/data/problems/374.yml +5 -7
  214. data/data/problems/375.yml +5 -6
  215. data/data/problems/377.yml +2 -2
  216. data/data/problems/378.yml +2 -2
  217. data/data/problems/379.yml +7 -8
  218. data/data/problems/38.yml +9 -9
  219. data/data/problems/380.yml +12 -15
  220. data/data/problems/381.yml +8 -11
  221. data/data/problems/382.yml +6 -6
  222. data/data/problems/383.yml +4 -4
  223. data/data/problems/384.yml +7 -8
  224. data/data/problems/385.yml +8 -8
  225. data/data/problems/386.yml +2 -2
  226. data/data/problems/388.yml +5 -6
  227. data/data/problems/39.yml +1 -1
  228. data/data/problems/390.yml +4 -6
  229. data/data/problems/391.yml +11 -12
  230. data/data/problems/392.yml +1 -1
  231. data/data/problems/393.yml +2 -2
  232. data/data/problems/394.yml +6 -7
  233. data/data/problems/395.yml +5 -5
  234. data/data/problems/396.yml +15 -17
  235. data/data/problems/397.yml +5 -8
  236. data/data/problems/4.yml +1 -1
  237. data/data/problems/40.yml +1 -1
  238. data/data/problems/400.yml +5 -6
  239. data/data/problems/401.yml +2 -2
  240. data/data/problems/402.yml +7 -8
  241. data/data/problems/403.yml +9 -10
  242. data/data/problems/404.yml +5 -6
  243. data/data/problems/405.yml +7 -7
  244. data/data/problems/406.yml +8 -10
  245. data/data/problems/407.yml +9 -9
  246. data/data/problems/410.yml +5 -6
  247. data/data/problems/411.yml +11 -12
  248. data/data/problems/412.yml +9 -9
  249. data/data/problems/414.yml +13 -15
  250. data/data/problems/415.yml +2 -2
  251. data/data/problems/417.yml +4 -5
  252. data/data/problems/418.yml +7 -8
  253. data/data/problems/419.yml +8 -8
  254. data/data/problems/420.yml +5 -5
  255. data/data/problems/421.yml +11 -12
  256. data/data/problems/422.yml +9 -9
  257. data/data/problems/423.yml +5 -7
  258. data/data/problems/424.yml +8 -9
  259. data/data/problems/425.yml +2 -3
  260. data/data/problems/426.yml +3 -3
  261. data/data/problems/427.yml +8 -8
  262. data/data/problems/428.yml +16 -19
  263. data/data/problems/430.yml +4 -5
  264. data/data/problems/44.yml +3 -3
  265. data/data/problems/45.yml +2 -2
  266. data/data/problems/46.yml +8 -8
  267. data/data/problems/47.yml +6 -10
  268. data/data/problems/53.yml +8 -9
  269. data/data/problems/56.yml +1 -1
  270. data/data/problems/57.yml +5 -5
  271. data/data/problems/58.yml +1 -1
  272. data/data/problems/6.yml +1 -1
  273. data/data/problems/61.yml +4 -4
  274. data/data/problems/64.yml +39 -46
  275. data/data/problems/65.yml +13 -14
  276. data/data/problems/66.yml +10 -10
  277. data/data/problems/68.yml +4 -5
  278. data/data/problems/69.yml +2 -2
  279. data/data/problems/70.yml +3 -4
  280. data/data/problems/71.yml +3 -3
  281. data/data/problems/72.yml +3 -3
  282. data/data/problems/73.yml +3 -3
  283. data/data/problems/74.yml +15 -22
  284. data/data/problems/75.yml +1 -1
  285. data/data/problems/8.yml +14 -14
  286. data/data/problems/81.yml +7 -7
  287. data/data/problems/82.yml +4 -4
  288. data/data/problems/83.yml +4 -4
  289. data/data/problems/85.yml +1 -1
  290. data/data/problems/86.yml +8 -8
  291. data/data/problems/88.yml +22 -27
  292. data/data/problems/9.yml +6 -6
  293. data/data/problems/90.yml +13 -13
  294. data/data/problems/91.yml +8 -8
  295. data/data/problems/92.yml +7 -9
  296. data/data/problems/93.yml +9 -10
  297. data/data/problems/95.yml +1 -1
  298. data/data/problems/96.yml +17 -17
  299. data/data/problems/97.yml +2 -2
  300. data/data/problems/99.yml +2 -2
  301. data/lib/euler/problem.rb +6 -1
  302. data/lib/euler/version.rb +1 -1
  303. metadata +2 -2
data/data/problems/47.yml CHANGED
@@ -3,14 +3,10 @@
3
3
  :name: Distinct primes factors
4
4
  :url: http://projecteuler.net/problem=47
5
5
  :content: "The first two consecutive numbers to have two distinct prime factors are:\n\n14
6
- = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 7
7
- \ \n15 = 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
6
+ = 2 ![×]({{ images_dir }}/symbol_times.gif) 7 \n15 = 3 ![×]({{ images_dir }}/symbol_times.gif)
8
7
  5\n\nThe first three consecutive numbers to have three distinct prime factors are:\n\n644
9
- = 2² ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 7
10
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 23 \n645
11
- = 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 5
12
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 43 \n646
13
- = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 17
14
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 19.\n\nFind
15
- the first four consecutive integers to have four distinct prime factors. What is
16
- the first of these numbers?\n\n"
8
+ = 2² ![×]({{ images_dir }}/symbol_times.gif) 7 ![×]({{ images_dir }}/symbol_times.gif)
9
+ 23 \n645 = 3 ![×]({{ images_dir }}/symbol_times.gif) 5 ![×]({{ images_dir }}/symbol_times.gif)
10
+ 43 \n646 = 2 ![×]({{ images_dir }}/symbol_times.gif) 17 ![×]({{ images_dir }}/symbol_times.gif)
11
+ 19.\n\nFind the first four consecutive integers to have four distinct prime factors.
12
+ What is the first of these numbers?\n\n"
data/data/problems/53.yml CHANGED
@@ -7,13 +7,12 @@
7
7
  notation, <sup>5</sup>C<sub>3</sub> = 10.\n\nIn general,\n\n| <sup><var>n</var></sup>C<sub><var>r</var></sub>
8
8
  = | \n<var>n</var>! \n<var>r</var>!(<var>n<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
9
9
  width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">r</var>)!\n
10
- | ,where <var>r</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
11
- <var>n</var>, <var>n</var>! = <var>n</var> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)(<var>n</var>
12
- ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1) ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)...
13
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2
14
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)1, and
15
- 0! = 1. |\n\nIt is not until <var>n</var> = 23, that a value exceeds one-million:
16
- <sup>23</sup>C<sub>10</sub> = 1144066.\n\nHow many, not necessarily distinct, values
17
- of  <sup><var>n</var></sup>C<sub><var>r</var></sub>, for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
18
- <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
10
+ | ,where <var>r</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var>, <var>n</var>!
11
+ = <var>n</var> ![×]({{ images_dir }}/symbol_times.gif)(<var>n</var> ![−]({{ images_dir
12
+ }}/symbol_minus.gif)1) ![×]({{ images_dir }}/symbol_times.gif)... ![×]({{ images_dir
13
+ }}/symbol_times.gif)3 ![×]({{ images_dir }}/symbol_times.gif)2 ![×]({{ images_dir
14
+ }}/symbol_times.gif)1, and 0! = 1. |\n\nIt is not until <var>n</var> = 23, that
15
+ a value exceeds one-million: <sup>23</sup>C<sub>10</sub> = 1144066.\n\nHow many,
16
+ not necessarily distinct, values of  <sup><var>n</var></sup>C<sub><var>r</var></sub>,
17
+ for 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)
19
18
  100, are greater than one-million?\n\n"
data/data/problems/56.yml CHANGED
@@ -5,5 +5,5 @@
5
5
  :content: |+
6
6
  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.
7
7
 
8
- Considering natural numbers of the form, _a<sup>b</sup>_, where _a, b_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 100, what is the maximum digital sum?
8
+ Considering natural numbers of the form, _a<sup>b</sup>_, where _a, b_ ![<]({{ images_dir }}/symbol_lt.gif) 100, what is the maximum digital sum?
9
9
 
data/data/problems/57.yml CHANGED
@@ -3,11 +3,11 @@
3
3
  :name: Square root convergents
4
4
  :url: http://projecteuler.net/problem=57
5
5
  :content: "It is possible to show that the square root of two can be expressed as
6
- an infinite continued fraction.\n\n![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)
7
- 2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213...\n\nBy expanding this for the
8
- first four iterations, we get:\n\n1 + 1/2 = 3/2 = 1.5 \n\r1 + 1/(2 + 1/2) = 7/5
9
- = 1.4 \n\r1 + 1/(2 + 1/(2 + 1/2)) = 17/12 = 1.41666... \n\r1 + 1/(2 + 1/(2 + 1/(2
10
- + 1/2))) = 41/29 = 1.41379...\n\nThe next three expansions are 99/70, 239/169, and
6
+ an infinite continued fraction.\n\n![√]({{ images_dir }}/symbol_radic.gif) 2 = 1
7
+ + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213...\n\nBy expanding this for the first
8
+ four iterations, we get:\n\n1 + 1/2 = 3/2 = 1.5 \n\r1 + 1/(2 + 1/2) = 7/5 = 1.4
9
+ \ \n\r1 + 1/(2 + 1/(2 + 1/2)) = 17/12 = 1.41666... \n\r1 + 1/(2 + 1/(2 + 1/(2 +
10
+ 1/2))) = 41/29 = 1.41379...\n\nThe next three expansions are 99/70, 239/169, and
11
11
  577/408, but the eighth expansion, 1393/985, is the first example where the number
12
12
  of digits in the numerator exceeds the number of digits in the denominator.\n\nIn
13
13
  the first one-thousand expansions, how many fractions contain a numerator with more
data/data/problems/58.yml CHANGED
@@ -8,7 +8,7 @@
8
8
  \ \n\r41 20   **7**  8  9 10 27 \n\r42 21 22 23 24 25 26 \n**43** 44 45 46 47
9
9
  48 49\n\nIt is interesting to note that the odd squares lie along the bottom right
10
10
  diagonal, but what is more interesting is that 8 out of the 13 numbers lying along
11
- both diagonals are prime; that is, a ratio of 8/13 ![≈](/home/will/src/euler-manager/config/../data/images/symbol_asymp.gif)
11
+ both diagonals are prime; that is, a ratio of 8/13 ![≈]({{ images_dir }}/symbol_asymp.gif)
12
12
  62%.\n\nIf one complete new layer is wrapped around the spiral above, a square spiral
13
13
  with side length 9 will be formed. If this process is continued, what is the side
14
14
  length of the square spiral for which the ratio of primes along both diagonals first
data/data/problems/6.yml CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  (1 + 2 + ... + 10)<sup>2</sup> = 55<sup>2</sup> = 3025
13
13
 
14
- Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 385 = 2640.
14
+ Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 ![−]({{ images_dir }}/symbol_minus.gif) 385 = 2640.
15
15
 
16
16
  Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
17
17
 
data/data/problems/61.yml CHANGED
@@ -7,10 +7,10 @@
7
7
 
8
8
  | Triangle |   | P<sub>3,<i>n</i></sub>=_n_(_n_+1)/2 |   | 1, 3, 6, 10, 15, ... |
9
9
  | Square |   | P<sub>4,<i>n</i></sub>=_n_<sup>2</sup> |   | 1, 4, 9, 16, 25, ... |
10
- | Pentagonal |   | P<sub>5,<i>n</i></sub>=_n_(3_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1)/2 |   | 1, 5, 12, 22, 35, ... |
11
- | Hexagonal |   | P<sub>6,<i>n</i></sub>=_n_(2_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1) |   | 1, 6, 15, 28, 45, ... |
12
- | Heptagonal |   | P<sub>7,<i>n</i></sub>=_n_(5_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)3)/2 |   | 1, 7, 18, 34, 55, ... |
13
- | Octagonal |   | P<sub>8,<i>n</i></sub>=_n_(3_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2) |   | 1, 8, 21, 40, 65, ... |
10
+ | Pentagonal |   | P<sub>5,<i>n</i></sub>=_n_(3_n_ ![−]({{ images_dir }}/symbol_minus.gif)1)/2 |   | 1, 5, 12, 22, 35, ... |
11
+ | Hexagonal |   | P<sub>6,<i>n</i></sub>=_n_(2_n_ ![−]({{ images_dir }}/symbol_minus.gif)1) |   | 1, 6, 15, 28, 45, ... |
12
+ | Heptagonal |   | P<sub>7,<i>n</i></sub>=_n_(5_n_ ![−]({{ images_dir }}/symbol_minus.gif)3)/2 |   | 1, 7, 18, 34, 55, ... |
13
+ | Octagonal |   | P<sub>8,<i>n</i></sub>=_n_(3_n_ ![−]({{ images_dir }}/symbol_minus.gif)2) |   | 1, 8, 21, 40, 65, ... |
14
14
 
15
15
  The ordered set of three 4-digit numbers: 8128, 2882, 8281, has three interesting properties.
16
16
 
data/data/problems/64.yml CHANGED
@@ -3,54 +3,47 @@
3
3
  :name: Odd period square roots
4
4
  :url: http://projecteuler.net/problem=64
5
5
  :content: "All square roots are periodic when written as continued fractions and can
6
- be written in the form:\n\n| ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)<var>N</var>
6
+ be written in the form:\n\n| ![√]({{ images_dir }}/symbol_radic.gif)<var>N</var>
7
7
  = <var>a</var><sub>0</sub> + | \n1\n |\n|   | <var>a</var><sub>1</sub> + | \n1\n
8
8
  |\n|   |   | <var>a</var><sub>2</sub> + | \n1\n |\n|   |   |   | <var>a</var><sub>3</sub>
9
- + ... |\n\nFor example, let us consider ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23:\n\n|
10
- ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23 = 4
11
- + ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23
12
- 4 = 4 +  | \n1\n |  = 4 +  | \n1\n |\n|   | \n1 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4\n
13
- |   | 1 +  | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23
14
- – 3 \n7\n |\n\nIf we continue we would get the following expansion:\n\n| ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23
9
+ + ... |\n\nFor example, let us consider ![√]({{ images_dir }}/symbol_radic.gif)23:\n\n|
10
+ ![√]({{ images_dir }}/symbol_radic.gif)23 = 4 + ![√]({{ images_dir }}/symbol_radic.gif)23
11
+ — 4 = 4 +  | \n1\n |  = 4 +  | \n1\n |\n|   | \n1 \n ![√]({{ images_dir }}/symbol_radic.gif)23—4\n
12
+ |   | 1 +  | \n ![√]({{ images_dir }}/symbol_radic.gif)23 – 3 \n7\n |\n\nIf we
13
+ continue we would get the following expansion:\n\n| ![√]({{ images_dir }}/symbol_radic.gif)23
15
14
  = 4 + | \n1\n |\n|   | 1 + | \n1\n |\n|   |   | 3 + | \n1\n |\n|   |   |   | 1 +
16
15
  | \n1\n |\n|   |   |   |   | 8 + ... |\n\nThe process can be summarised as follows:\n\n|
17
- <var>a</var><sub>0</sub> = 4, |   | \n1 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4\n
18
- |  =  | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+4
19
- \ \n7\n |  = 1 | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—3
20
- \ \n7\n |\n| <var>a</var><sub>1</sub> = 1, |   | \n7 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—3\n
21
- |  =  | \n7( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+3)
22
- \ \n14\n |  = 3 | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—3
23
- \ \n2\n |\n| <var>a</var><sub>2</sub> = 3, |   | \n2 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)233\n
24
- |  =  | \n2( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+3)
25
- \ \n14\n |  = 1 | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4
26
- \ \n7\n |\n| <var>a</var><sub>3</sub> = 1, |   | \n7 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4\n
27
- |  =  | \n7( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+4)
28
- \ \n7\n |  = 8 +  | ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4
29
- |\n| <var>a</var><sub>4</sub> = 8, |   | \n1 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4\n
30
- |  =  | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+4
31
- \ \n7\n |  = 1 +  | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—3
32
- \ \n7\n |\n| <var>a</var><sub>5</sub> = 1, |   | \n7 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—3\n
33
- |  =  | \n7( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+3)
34
- \ \n14\n |  = 3 +  | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—3
35
- \ \n2\n |\n| <var>a</var><sub>6</sub> = 3, |   | \n2 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—3\n
36
- |  =  | \n2( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+3)
37
- \ \n14\n |  = 1 +  | \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4
38
- \ \n7\n |\n| <var>a</var><sub>7</sub> = 1, |   | \n7 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4\n
39
- |  =  | \n7( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23+4)
40
- \ \n7\n |  = 8 +  | ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23—4
16
+ <var>a</var><sub>0</sub> = 4, |   | \n1 \n ![√]({{ images_dir }}/symbol_radic.gif)23—4\n
17
+ |  =  | \n ![√]({{ images_dir }}/symbol_radic.gif)23+4 \n7\n |  = 1 +  | \n ![√]({{
18
+ images_dir }}/symbol_radic.gif)23—3 \n7\n |\n| <var>a</var><sub>1</sub> = 1, |
19
+   | \n7 \n ![√]({{ images_dir }}/symbol_radic.gif)23—3\n |  =  | \n7( ![√]({{ images_dir
20
+ }}/symbol_radic.gif)23+3) \n14\n |  = 3 +  | \n ![√]({{ images_dir }}/symbol_radic.gif)233
21
+ \ \n2\n |\n| <var>a</var><sub>2</sub> = 3, |   | \n2 \n ![√]({{ images_dir }}/symbol_radic.gif)23—3\n
22
+ |  =  | \n2( ![√]({{ images_dir }}/symbol_radic.gif)23+3) \n14\n |  = 1 +  | \n
23
+ ![√]({{ images_dir }}/symbol_radic.gif)23—4 \n7\n |\n| <var>a</var><sub>3</sub>
24
+ = 1, |   | \n7 \n ![√]({{ images_dir }}/symbol_radic.gif)23—4\n |  =  | \n7( ![√]({{
25
+ images_dir }}/symbol_radic.gif)23+4) \n7\n |  = 8 | ![√]({{ images_dir }}/symbol_radic.gif)23—4
26
+ |\n| <var>a</var><sub>4</sub> = 8, |   | \n1 \n ![√]({{ images_dir }}/symbol_radic.gif)234\n
27
+ |  =  | \n ![√]({{ images_dir }}/symbol_radic.gif)23+4 \n7\n |  = 1 +  | \n ![√]({{
28
+ images_dir }}/symbol_radic.gif)23—3 \n7\n |\n| <var>a</var><sub>5</sub> = 1, |
29
+   | \n7 \n ![√]({{ images_dir }}/symbol_radic.gif)23—3\n |  =  | \n7( ![√]({{ images_dir
30
+ }}/symbol_radic.gif)23+3) \n14\n |  = 3 +  | \n ![√]({{ images_dir }}/symbol_radic.gif)23—3
31
+ \ \n2\n |\n| <var>a</var><sub>6</sub> = 3, |   | \n2 \n ![√]({{ images_dir }}/symbol_radic.gif)23—3\n
32
+ |  =  | \n2( ![√]({{ images_dir }}/symbol_radic.gif)23+3) \n14\n |  = 1 +  | \n
33
+ ![√]({{ images_dir }}/symbol_radic.gif)23—4 \n7\n |\n| <var>a</var><sub>7</sub>
34
+ = 1, |   | \n7 \n ![√]({{ images_dir }}/symbol_radic.gif)23—4\n |  =  | \n7( ![√]({{
35
+ images_dir }}/symbol_radic.gif)23+4) \n7\n |  = 8 +  | ![√]({{ images_dir }}/symbol_radic.gif)23—4
41
36
  |\n\nIt can be seen that the sequence is repeating. For conciseness, we use the
42
- notation ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23
43
- = [4;(1,3,1,8)], to indicate that the block (1,3,1,8) repeats indefinitely.\n\nThe
44
- first ten continued fraction representations of (irrational) square roots are:\n\n![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2=[1;(2)],
45
- period=1 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)3=[1;(1,2)],
46
- period=2 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)5=[2;(4)],
47
- period=1 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)6=[2;(2,4)],
48
- period=2 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)7=[2;(1,1,1,4)],
49
- period=4 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)8=[2;(1,4)],
50
- period=2 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)10=[3;(6)],
51
- period=1 \n ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)11=[3;(3,6)],
52
- period=2 \n ![](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)12=
53
- [3;(2,6)], period=2 \n ![](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)13=[3;(1,1,1,1,6)],
54
- period=5\n\nExactly four continued fractions, for <var>N</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
55
- 13, have an odd period.\n\nHow many continued fractions for <var>N</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
56
- 10000 have an odd period?\n\n"
37
+ notation ![√]({{ images_dir }}/symbol_radic.gif)23 = [4;(1,3,1,8)], to indicate
38
+ that the block (1,3,1,8) repeats indefinitely.\n\nThe first ten continued fraction
39
+ representations of (irrational) square roots are:\n\n![√]({{ images_dir }}/symbol_radic.gif)2=[1;(2)],
40
+ period=1 \n ![√]({{ images_dir }}/symbol_radic.gif)3=[1;(1,2)], period=2 \n ![√]({{
41
+ images_dir }}/symbol_radic.gif)5=[2;(4)], period=1 \n ![√]({{ images_dir }}/symbol_radic.gif)6=[2;(2,4)],
42
+ period=2 \n ![√]({{ images_dir }}/symbol_radic.gif)7=[2;(1,1,1,4)], period=4 \n
43
+ ![√]({{ images_dir }}/symbol_radic.gif)8=[2;(1,4)], period=2 \n ![√]({{ images_dir
44
+ }}/symbol_radic.gif)10=[3;(6)], period=1 \n ![√]({{ images_dir }}/symbol_radic.gif)11=[3;(3,6)],
45
+ period=2 \n ![√]({{ images_dir }}/symbol_radic.gif)12= [3;(2,6)], period=2 \n
46
+ ![√]({{ images_dir }}/symbol_radic.gif)13=[3;(1,1,1,1,6)], period=5\n\nExactly four
47
+ continued fractions, for <var>N</var> ![]({{ images_dir }}/symbol_le.gif) 13, have
48
+ an odd period.\n\nHow many continued fractions for <var>N</var> ![]({{ images_dir
49
+ }}/symbol_le.gif) 10000 have an odd period?\n\n"
data/data/problems/65.yml CHANGED
@@ -3,24 +3,23 @@
3
3
  :name: Convergents of e
4
4
  :url: http://projecteuler.net/problem=65
5
5
  :content: "The square root of 2 can be written as an infinite continued fraction.\n\n|
6
- ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2 = 1 +
7
- | \n1\n |\n|   | 2 + | \n1\n |\n|   |   | 2 + | \n1\n |\n|   |   |   | 2 + | \n1\n
8
- |\n|   |   |   |   | 2 + ... |\n\nThe infinite continued fraction can be written,
9
- ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2 = [1;(2)],
10
- (2) indicates that 2 repeats _ad infinitum_. In a similar way, ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)23
11
- = [4;(1,3,1,8)].\n\nIt turns out that the sequence of partial values of continued
12
- fractions for square roots provide the best rational approximations. Let us consider
13
- the convergents for ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2.\n\n|
6
+ ![√]({{ images_dir }}/symbol_radic.gif)2 = 1 + | \n1\n |\n|   | 2 + | \n1\n |\n|
7
+   |   | 2 + | \n1\n |\n|   |   |   | 2 + | \n1\n |\n|   |   |   |   | 2 + ... |\n\nThe
8
+ infinite continued fraction can be written, ![√]({{ images_dir }}/symbol_radic.gif)2
9
+ = [1;(2)], (2) indicates that 2 repeats _ad infinitum_. In a similar way, ![√]({{
10
+ images_dir }}/symbol_radic.gif)23 = [4;(1,3,1,8)].\n\nIt turns out that the sequence
11
+ of partial values of continued fractions for square roots provide the best rational
12
+ approximations. Let us consider the convergents for ![√]({{ images_dir }}/symbol_radic.gif)2.\n\n|
14
13
  1 + | \n1\n | = 3/2 |\n|   | \n2\n |   |\n\n| 1 + | \n1\n | = 7/5 |\n|   | 2 + |
15
14
  \n1\n |\n|   |   | \n2\n |   |\n\n| 1 + | \n1\n | = 17/12 |\n|   | 2 + | \n1\n |
16
15
    |\n|   |   | 2 + | \n1\n |   |\n|   |   |   | \n2\n |   |\n\n| 1 + | \n1\n | =
17
16
  41/29 |\n|   | 2 + | \n1\n |\n|   |   | 2 + | \n1\n |   |\n|   |   |   | 2 + | \n1\n
18
17
  |   |\n|   |   |   |   | \n2\n |   |\n\nHence the sequence of the first ten convergents
19
- for ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2 are:\n\n1,
20
- 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, ...\n\nWhat
21
- is most surprising is that the important mathematical constant, \n_e_ = [2; 1,2,1,
22
- 1,4,1, 1,6,1 , ... , 1,2_k_,1, ...].\n\nThe first ten terms in the sequence of convergents
23
- for _e_ are:\n\n2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536,
24
- ...\n\nThe sum of digits in the numerator of the 10<sup>th</sup> convergent is 1+4+5+7=17.\n\nFind
18
+ for ![√]({{ images_dir }}/symbol_radic.gif)2 are:\n\n1, 3/2, 7/5, 17/12, 41/29,
19
+ 99/70, 239/169, 577/408, 1393/985, 3363/2378, ...\n\nWhat is most surprising is
20
+ that the important mathematical constant, \n_e_ = [2; 1,2,1, 1,4,1, 1,6,1 , ...
21
+ , 1,2_k_,1, ...].\n\nThe first ten terms in the sequence of convergents for _e_
22
+ are:\n\n2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536, ...\n\nThe
23
+ sum of digits in the numerator of the 10<sup>th</sup> convergent is 1+4+5+7=17.\n\nFind
25
24
  the sum of digits in the numerator of the 100<sup>th</sup> convergent of the continued
26
25
  fraction for _e_.\n\n"
data/data/problems/66.yml CHANGED
@@ -4,14 +4,14 @@
4
4
  :url: http://projecteuler.net/problem=66
5
5
  :content: "Consider quadratic Diophantine equations of the form:\n\n_x_<sup>2</sup>
6
6
  – D_y_<sup>2</sup> = 1\n\nFor example, when D=13, the minimal solution in _x_ is
7
- 649<sup>2</sup> – 13 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)180<sup>2</sup>
8
- = 1.\n\nIt can be assumed that there are no solutions in positive integers when
9
- D is square.\n\nBy finding minimal solutions in _x_ for D = {2, 3, 5, 6, 7}, we
10
- obtain the following:\n\n3<sup>2</sup> – 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2<sup>2</sup>
11
- = 1 \n\r2<sup>2</sup> – 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)1<sup>2</sup>
12
- = 1 \n9<sup>2</sup> – 5 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)4<sup>2</sup>
13
- = 1 \n\r5<sup>2</sup> – 6 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2<sup>2</sup>
14
- = 1 \n\r8<sup>2</sup> – 7 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3<sup>2</sup>
15
- = 1\n\nHence, by considering minimal solutions in _x_ for D ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
16
- 7, the largest _x_ is obtained when D=5.\n\nFind the value of D ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
7
+ 649<sup>2</sup> – 13 ![×]({{ images_dir }}/symbol_times.gif)180<sup>2</sup> = 1.\n\nIt
8
+ can be assumed that there are no solutions in positive integers when D is square.\n\nBy
9
+ finding minimal solutions in _x_ for D = {2, 3, 5, 6, 7}, we obtain the following:\n\n3<sup>2</sup>
10
+ – 2 ![×]({{ images_dir }}/symbol_times.gif)2<sup>2</sup> = 1 \n\r2<sup>2</sup>
11
+ – 3 ![×]({{ images_dir }}/symbol_times.gif)1<sup>2</sup> = 1 \n9<sup>2</sup> –
12
+ 5 ![×]({{ images_dir }}/symbol_times.gif)4<sup>2</sup> = 1 \n\r5<sup>2</sup> –
13
+ 6 ![×]({{ images_dir }}/symbol_times.gif)2<sup>2</sup> = 1 \n\r8<sup>2</sup> –
14
+ 7 ![×]({{ images_dir }}/symbol_times.gif)3<sup>2</sup> = 1\n\nHence, by considering
15
+ minimal solutions in _x_ for D ![≤]({{ images_dir }}/symbol_le.gif) 7, the largest
16
+ _x_ is obtained when D=5.\n\nFind the value of D ![≤]({{ images_dir }}/symbol_le.gif)
17
17
  1000 in minimal solutions of _x_ for which the largest value of _x_ is obtained.\n\n"
data/data/problems/68.yml CHANGED
@@ -3,9 +3,9 @@
3
3
  :name: Magic 5-gon ring
4
4
  :url: http://projecteuler.net/problem=68
5
5
  :content: "Consider the following \"magic\" 3-gon ring, filled with the numbers 1
6
- to 6, and each line adding to nine.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_068_1.gif)
7
- \ \n\nWorking **clockwise** , and starting from the group of three with the numerically
8
- lowest external node (4,3,2 in this example), each solution can be described uniquely.
6
+ to 6, and each line adding to nine.\n\n ![]({{ images_dir }}/p_068_1.gif) \n\nWorking
7
+ **clockwise** , and starting from the group of three with the numerically lowest
8
+ external node (4,3,2 in this example), each solution can be described uniquely.
9
9
  For example, the above solution can be described by the set: 4,3,2; 6,2,1; 5,1,3.\n\nIt
10
10
  is possible to complete the ring with four different totals: 9, 10, 11, and 12.
11
11
  There are eight solutions in total.\n\n| **Total** | **Solution Set** |\n| 9 | 4,2,3;
@@ -15,5 +15,4 @@
15
15
  each group it is possible to form 9-digit strings; the maximum string for a 3-gon
16
16
  ring is 432621513.\n\nUsing the numbers 1 to 10, and depending on arrangements,
17
17
  it is possible to form 16- and 17-digit strings. What is the maximum **16-digit**
18
- string for a \"magic\" 5-gon ring?\n\n ![](/home/will/src/euler-manager/config/../data/images/p_068_2.gif)
19
- \ \n\n"
18
+ string for a \"magic\" 5-gon ring?\n\n ![]({{ images_dir }}/p_068_2.gif) \n\n"
data/data/problems/69.yml CHANGED
@@ -16,7 +16,7 @@
16
16
  | 9 | 1,2,4,5,7,8 | 6 | 1.5 |
17
17
  | 10 | 1,3,7,9 | 4 | 2.5 |
18
18
 
19
- It can be seen that _n_=6 produces a maximum _n_/φ(_n_) for _n_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10.
19
+ It can be seen that _n_=6 produces a maximum _n_/φ(_n_) for _n_ ![≤]({{ images_dir }}/symbol_le.gif) 10.
20
20
 
21
- Find the value of _n_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1,000,000 for which _n_/φ(_n_) is a maximum.
21
+ Find the value of _n_ ![≤]({{ images_dir }}/symbol_le.gif) 1,000,000 for which _n_/φ(_n_) is a maximum.
22
22
 
data/data/problems/70.yml CHANGED
@@ -8,7 +8,6 @@
8
8
  are all less than nine and relatively prime to nine, φ(9)=6. \nThe number 1 is
9
9
  considered to be relatively prime to every positive number, so φ(1)=1.\n\nInterestingly,
10
10
  φ(87109)=79180, and it can be seen that 87109 is a permutation of 79180.\n\nFind
11
- the value of <var>n</var>, 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
12
- <var>n</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
13
- 10<sup>7</sup>, for which φ(<var>n</var>) is a permutation of <var>n</var> and the
14
- ratio <var>n</var>/φ(<var>n</var>) produces a minimum.\n\n"
11
+ the value of <var>n</var>, 1 ![<]({{ images_dir }}/symbol_lt.gif) <var>n</var> ![<]({{
12
+ images_dir }}/symbol_lt.gif) 10<sup>7</sup>, for which φ(<var>n</var>) is a permutation
13
+ of <var>n</var> and the ratio <var>n</var>/φ(<var>n</var>) produces a minimum.\n\n"
data/data/problems/71.yml CHANGED
@@ -3,13 +3,13 @@
3
3
  :name: Ordered fractions
4
4
  :url: http://projecteuler.net/problem=71
5
5
  :content: |+
6
- Consider the fraction, _n/d_, where _n_ and _d_ are positive integers. If _n_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)_d_ and HCF(_n,d_)=1, it is called a reduced proper fraction.
6
+ Consider the fraction, _n/d_, where _n_ and _d_ are positive integers. If _n_ ![<]({{ images_dir }}/symbol_lt.gif)_d_ and HCF(_n,d_)=1, it is called a reduced proper fraction.
7
7
 
8
- If we list the set of reduced proper fractions for _d_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 8 in ascending order of size, we get:
8
+ If we list the set of reduced proper fractions for _d_ ![≤]({{ images_dir }}/symbol_le.gif) 8 in ascending order of size, we get:
9
9
 
10
10
  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
11
11
 
12
12
  It can be seen that 2/5 is the fraction immediately to the left of 3/7.
13
13
 
14
- By listing the set of reduced proper fractions for _d_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1,000,000 in ascending order of size, find the numerator of the fraction immediately to the left of 3/7.
14
+ By listing the set of reduced proper fractions for _d_ ![≤]({{ images_dir }}/symbol_le.gif) 1,000,000 in ascending order of size, find the numerator of the fraction immediately to the left of 3/7.
15
15
 
data/data/problems/72.yml CHANGED
@@ -3,13 +3,13 @@
3
3
  :name: Counting fractions
4
4
  :url: http://projecteuler.net/problem=72
5
5
  :content: |+
6
- Consider the fraction, _n/d_, where _n_ and _d_ are positive integers. If _n_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)_d_ and HCF(_n,d_)=1, it is called a reduced proper fraction.
6
+ Consider the fraction, _n/d_, where _n_ and _d_ are positive integers. If _n_ ![<]({{ images_dir }}/symbol_lt.gif)_d_ and HCF(_n,d_)=1, it is called a reduced proper fraction.
7
7
 
8
- If we list the set of reduced proper fractions for _d_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 8 in ascending order of size, we get:
8
+ If we list the set of reduced proper fractions for _d_ ![≤]({{ images_dir }}/symbol_le.gif) 8 in ascending order of size, we get:
9
9
 
10
10
  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
11
11
 
12
12
  It can be seen that there are 21 elements in this set.
13
13
 
14
- How many elements would be contained in the set of reduced proper fractions for _d_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1,000,000?
14
+ How many elements would be contained in the set of reduced proper fractions for _d_ ![≤]({{ images_dir }}/symbol_le.gif) 1,000,000?
15
15
 
data/data/problems/73.yml CHANGED
@@ -3,13 +3,13 @@
3
3
  :name: Counting fractions in a range
4
4
  :url: http://projecteuler.net/problem=73
5
5
  :content: |+
6
- Consider the fraction, _n/d_, where _n_ and _d_ are positive integers. If _n_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)_d_ and HCF(_n,d_)=1, it is called a reduced proper fraction.
6
+ Consider the fraction, _n/d_, where _n_ and _d_ are positive integers. If _n_ ![<]({{ images_dir }}/symbol_lt.gif)_d_ and HCF(_n,d_)=1, it is called a reduced proper fraction.
7
7
 
8
- If we list the set of reduced proper fractions for _d_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 8 in ascending order of size, we get:
8
+ If we list the set of reduced proper fractions for _d_ ![≤]({{ images_dir }}/symbol_le.gif) 8 in ascending order of size, we get:
9
9
 
10
10
  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
11
11
 
12
12
  It can be seen that there are 3 fractions between 1/3 and 1/2.
13
13
 
14
- How many fractions lie between 1/3 and 1/2 in the sorted set of reduced proper fractions for _d_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 12,000?
14
+ How many fractions lie between 1/3 and 1/2 in the sorted set of reduced proper fractions for _d_ ![≤]({{ images_dir }}/symbol_le.gif) 12,000?
15
15
 
data/data/problems/74.yml CHANGED
@@ -5,25 +5,18 @@
5
5
  :content: "The number 145 is well known for the property that the sum of the factorial
6
6
  of its digits is equal to 145:\n\n1! + 4! + 5! = 1 + 24 + 120 = 145\n\nPerhaps less
7
7
  well known is 169, in that it produces the longest chain of numbers that link back
8
- to 169; it turns out that there are only three such loops that exist:\n\n169 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
9
- 363601 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
10
- 1454 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 169
11
- \ \n871 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
12
- 45361 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 871
13
- \ \n872 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
14
- 45362 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 872\n\nIt
15
- is not difficult to prove that EVERY starting number will eventually get stuck in
16
- a loop. For example,\n\n69 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
17
- 363600 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
18
- 1454 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 169
19
- ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 363601
20
- ( ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 1454)
21
- \ \n78 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
22
- 45360 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 871
23
- ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 45361 (
24
- ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 871) \n540
25
- ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 145 ( ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
26
- 145)\n\nStarting with 69 produces a chain of five non-repeating terms, but the longest
27
- non-repeating chain with a starting number below one million is sixty terms.\n\nHow
28
- many chains, with a starting number below one million, contain exactly sixty non-repeating
29
- terms?\n\n"
8
+ to 169; it turns out that there are only three such loops that exist:\n\n169 ![→]({{
9
+ images_dir }}/symbol_maps.gif) 363601 ![→]({{ images_dir }}/symbol_maps.gif) 1454
10
+ ![→]({{ images_dir }}/symbol_maps.gif) 169 \n871 ![→]({{ images_dir }}/symbol_maps.gif)
11
+ 45361 ![→]({{ images_dir }}/symbol_maps.gif) 871 \n872 ![→]({{ images_dir }}/symbol_maps.gif)
12
+ 45362 ![→]({{ images_dir }}/symbol_maps.gif) 872\n\nIt is not difficult to prove
13
+ that EVERY starting number will eventually get stuck in a loop. For example,\n\n69
14
+ ![→]({{ images_dir }}/symbol_maps.gif) 363600 ![→]({{ images_dir }}/symbol_maps.gif)
15
+ 1454 ![→]({{ images_dir }}/symbol_maps.gif) 169 ![→]({{ images_dir }}/symbol_maps.gif)
16
+ 363601 ( ![→]({{ images_dir }}/symbol_maps.gif) 1454) \n78 ![→]({{ images_dir }}/symbol_maps.gif)
17
+ 45360 ![→]({{ images_dir }}/symbol_maps.gif) 871 ![→]({{ images_dir }}/symbol_maps.gif)
18
+ 45361 ( ![→]({{ images_dir }}/symbol_maps.gif) 871) \n540 ![→]({{ images_dir }}/symbol_maps.gif)
19
+ 145 ( ![→]({{ images_dir }}/symbol_maps.gif) 145)\n\nStarting with 69 produces a
20
+ chain of five non-repeating terms, but the longest non-repeating chain with a starting
21
+ number below one million is sixty terms.\n\nHow many chains, with a starting number
22
+ below one million, contain exactly sixty non-repeating terms?\n\n"
data/data/problems/75.yml CHANGED
@@ -10,5 +10,5 @@
10
10
  right angle triangle, and other lengths allow more than one solution to be found;
11
11
  for example, using 120 cm it is possible to form exactly three different integer
12
12
  sided right angle triangles.\n\n**120 cm** : (30,40,50), (20,48,52), (24,45,51)\n\nGiven
13
- that L is the length of the wire, for how many values of L ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
13
+ that L is the length of the wire, for how many values of L ![≤]({{ images_dir }}/symbol_le.gif)
14
14
  1,500,000 can exactly one integer sided right angle triangle be formed?\n\n"
data/data/problems/8.yml CHANGED
@@ -3,17 +3,17 @@
3
3
  :name: Largest product in a series
4
4
  :url: http://projecteuler.net/problem=8
5
5
  :content: "The four adjacent digits in the 1000-digit number that have the greatest
6
- product are 9 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
7
- 9 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 8 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
8
- 9 = 5832.\n\n73167176531330624919225119674426574742355349194934 \n\r96983520312774506326239578318016984801869478851843
9
- \ \n\r85861560789112949495459501737958331952853208805511 \n\r12540698747158523863050715693290963295227443043557
10
- \ \n\r66896648950445244523161731856403098711121722383113 \n\r62229893423380308135336276614282806444486645238749
11
- \ \n\r30358907296290491560440772390713810515859307960866 \n\r70172427121883998797908792274921901699720888093776
12
- \ \n\r65727333001053367881220235421809751254540594752243 \n\r52584907711670556013604839586446706324415722155397
13
- \ \n\r53697817977846174064955149290862569321978468622482 \n\r83972241375657056057490261407972968652414535100474
14
- \ \n\r82166370484403199890008895243450658541227588666881 \n\r16427171479924442928230863465674813919123162824586
15
- \ \n\r17866458359124566529476545682848912883142607690042 \n\r24219022671055626321111109370544217506941658960408
16
- \ \n\r07198403850962455444362981230987879927244284909188 \n\r84580156166097919133875499200524063689912560717606
17
- \ \n\r05886116467109405077541002256983155200055935729725 \n\r71636269561882670428252483600823257530420752963450\n\nFind
18
- the thirteen adjacent digits in the 1000-digit number that have the greatest product.
19
- What is the value of this product?\n\n"
6
+ product are 9 ![×]({{ images_dir }}/symbol_times.gif) 9 ![×]({{ images_dir }}/symbol_times.gif)
7
+ 8 ![×]({{ images_dir }}/symbol_times.gif) 9 = 5832.\n\n73167176531330624919225119674426574742355349194934
8
+ \ \n\r96983520312774506326239578318016984801869478851843 \n\r85861560789112949495459501737958331952853208805511
9
+ \ \n\r12540698747158523863050715693290963295227443043557 \n\r66896648950445244523161731856403098711121722383113
10
+ \ \n\r62229893423380308135336276614282806444486645238749 \n\r30358907296290491560440772390713810515859307960866
11
+ \ \n\r70172427121883998797908792274921901699720888093776 \n\r65727333001053367881220235421809751254540594752243
12
+ \ \n\r52584907711670556013604839586446706324415722155397 \n\r53697817977846174064955149290862569321978468622482
13
+ \ \n\r83972241375657056057490261407972968652414535100474 \n\r82166370484403199890008895243450658541227588666881
14
+ \ \n\r16427171479924442928230863465674813919123162824586 \n\r17866458359124566529476545682848912883142607690042
15
+ \ \n\r24219022671055626321111109370544217506941658960408 \n\r07198403850962455444362981230987879927244284909188
16
+ \ \n\r84580156166097919133875499200524063689912560717606 \n\r05886116467109405077541002256983155200055935729725
17
+ \ \n\r71636269561882670428252483600823257530420752963450\n\nFind the thirteen adjacent
18
+ digits in the 1000-digit number that have the greatest product. What is the value
19
+ of this product?\n\n"
data/data/problems/81.yml CHANGED
@@ -4,10 +4,10 @@
4
4
  :url: http://projecteuler.net/problem=81
5
5
  :content: "In the 5 by 5 matrix below, the minimal path sum from the top left to the
6
6
  bottom right, by **only moving to the right and down** , is indicated in bold red
7
- and is equal to 2427.\n\n| ![](/home/will/src/euler-manager/config/../data/images/bracket_left.gif)
8
- \ \n | \n\n| **131** | 673 | 234 | 103 | 18 |\n| **201** | **96** | **342** | 965
9
- | 150 |\n| 630 | 803 | **746** | **422** | 111 |\n| 537 | 699 | 497 | **121** |
10
- 956 |\n| 805 | 732 | 524 | **37** | **331** |\n\n | ![](/home/will/src/euler-manager/config/../data/images/bracket_right.gif)
11
- \ \n |\n\nFind the minimal path sum, in [matrix.txt](project/matrix.txt) (right
12
- click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix,
13
- from the top left to the bottom right by only moving right and down.\n\n"
7
+ and is equal to 2427.\n\n| ![]({{ images_dir }}/bracket_left.gif) \n | \n\n| **131**
8
+ | 673 | 234 | 103 | 18 |\n| **201** | **96** | **342** | 965 | 150 |\n| 630 | 803
9
+ | **746** | **422** | 111 |\n| 537 | 699 | 497 | **121** | 956 |\n| 805 | 732 |
10
+ 524 | **37** | **331** |\n\n | ![]({{ images_dir }}/bracket_right.gif) \n |\n\nFind
11
+ the minimal path sum, in [matrix.txt](project/matrix.txt) (right click and 'Save
12
+ Link/Target As...'), a 31K text file containing a 80 by 80 matrix, from the top
13
+ left to the bottom right by only moving right and down.\n\n"
data/data/problems/82.yml CHANGED
@@ -5,10 +5,10 @@
5
5
  :content: "NOTE: This problem is a more challenging version of [Problem 81](problem=81).\n\nThe
6
6
  minimal path sum in the 5 by 5 matrix below, by starting in any cell in the left
7
7
  column and finishing in any cell in the right column, and only moving up, down,
8
- and right, is indicated in red and bold; the sum is equal to 994.\n\n| ![](/home/will/src/euler-manager/config/../data/images/bracket_left.gif)
9
- \ \n | \n\n| 131 | 673 | **234** | **103** | **18** |\n| **201** | **96** | **342**
10
- | 965 | 150 |\n| 630 | 803 | 746 | 422 | 111 |\n| 537 | 699 | 497 | 121 | 956 |\n|
11
- 805 | 732 | 524 | 37 | 331 |\n\n | ![](/home/will/src/euler-manager/config/../data/images/bracket_right.gif)
8
+ and right, is indicated in red and bold; the sum is equal to 994.\n\n| ![]({{ images_dir
9
+ }}/bracket_left.gif) \n | \n\n| 131 | 673 | **234** | **103** | **18** |\n| **201**
10
+ | **96** | **342** | 965 | 150 |\n| 630 | 803 | 746 | 422 | 111 |\n| 537 | 699 |
11
+ 497 | 121 | 956 |\n| 805 | 732 | 524 | 37 | 331 |\n\n | ![]({{ images_dir }}/bracket_right.gif)
12
12
  \ \n |\n\nFind the minimal path sum, in [matrix.txt](project/matrix.txt) (right
13
13
  click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix,
14
14
  from the left column to the right column.\n\n"
data/data/problems/83.yml CHANGED
@@ -5,10 +5,10 @@
5
5
  :content: "NOTE: This problem is a significantly more challenging version of [Problem
6
6
  81](problem=81).\n\nIn the 5 by 5 matrix below, the minimal path sum from the top
7
7
  left to the bottom right, by moving left, right, up, and down, is indicated in bold
8
- red and is equal to 2297.\n\n| ![](/home/will/src/euler-manager/config/../data/images/bracket_left.gif)
9
- \ \n | \n\n| **131** | 673 | **234** | **103** | **18** |\n| **201** | **96** |
10
- **342** | 965 | **150** |\n| 630 | 803 | 746 | **422** | **111** |\n| 537 | 699
11
- | 497 | **121** | 956 |\n| 805 | 732 | 524 | **37** | **331** |\n\n | ![](/home/will/src/euler-manager/config/../data/images/bracket_right.gif)
8
+ red and is equal to 2297.\n\n| ![]({{ images_dir }}/bracket_left.gif) \n | \n\n|
9
+ **131** | 673 | **234** | **103** | **18** |\n| **201** | **96** | **342** | 965
10
+ | **150** |\n| 630 | 803 | 746 | **422** | **111** |\n| 537 | 699 | 497 | **121**
11
+ | 956 |\n| 805 | 732 | 524 | **37** | **331** |\n\n | ![]({{ images_dir }}/bracket_right.gif)
12
12
  \ \n |\n\nFind the minimal path sum, in [matrix.txt](project/matrix.txt) (right
13
13
  click and 'Save Link/Target As...'), a 31K text file containing a 80 by 80 matrix,
14
14
  from the top left to the bottom right by moving left, right, up, and down.\n\n"
data/data/problems/85.yml CHANGED
@@ -5,7 +5,7 @@
5
5
  :content: |+
6
6
  By counting carefully it can be seen that a rectangular grid measuring 3 by 2 contains eighteen rectangles:
7
7
 
8
- ![](/home/will/src/euler-manager/config/../data/images/p_085.gif)
8
+ ![]({{ images_dir }}/p_085.gif)
9
9
 
10
10
  Although there exists no rectangular grid that contains exactly two million rectangles, find the area of the grid with the nearest solution.
11
11
 
data/data/problems/86.yml CHANGED
@@ -5,11 +5,11 @@
5
5
  :content: "A spider, S, sits in one corner of a cuboid room, measuring 6 by 5 by 3,
6
6
  and a fly, F, sits in the opposite corner. By travelling on the surfaces of the
7
7
  room the shortest \"straight line\" distance from S to F is 10 and the path is shown
8
- on the diagram.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_086.gif)
9
- \ \n\nHowever, there are up to three \"shortest\" path candidates for any given
10
- cuboid and the shortest route doesn't always have integer length.\n\nBy considering
11
- all cuboid rooms with integer dimensions, up to a maximum size of M by M by M, there
12
- are exactly 2060 cuboids for which the shortest route has integer length when M=100,
13
- and this is the least value of M for which the number of solutions first exceeds
14
- two thousand; the number of solutions is 1975 when M=99.\n\nFind the least value
15
- of M such that the number of solutions first exceeds one million.\n\n"
8
+ on the diagram.\n\n ![]({{ images_dir }}/p_086.gif) \n\nHowever, there are up to
9
+ three \"shortest\" path candidates for any given cuboid and the shortest route doesn't
10
+ always have integer length.\n\nBy considering all cuboid rooms with integer dimensions,
11
+ up to a maximum size of M by M by M, there are exactly 2060 cuboids for which the
12
+ shortest route has integer length when M=100, and this is the least value of M for
13
+ which the number of solutions first exceeds two thousand; the number of solutions
14
+ is 1975 when M=99.\n\nFind the least value of M such that the number of solutions
15
+ first exceeds one million.\n\n"