euler-manager 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -5,36 +5,27 @@
5
5
  :content: "Using a combination of black square tiles and oblong tiles chosen from:
6
6
  red tiles measuring two units, green tiles measuring three units, and blue tiles
7
7
  measuring four units, it is possible to tile a row measuring five units in length
8
- in exactly fifteen different ways.\n\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
9
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
10
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
11
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
12
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
13
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n | \n\n|
14
- ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
15
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
16
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
17
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
18
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n |\n|
19
- \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
20
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
21
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
22
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
23
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
24
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
25
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
26
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
27
- |\n\n |\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
28
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
29
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
30
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
31
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
32
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
33
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
34
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n |\n|
35
- \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
36
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
37
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n | \n\n|
38
- ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
39
- |\n\n |   |\n\nHow many ways can a row measuring fifty units in length be tiled?\n\nNOTE:
40
- This is related to [Problem 116](problem=116).\n\n"
8
+ in exactly fifteen different ways.\n\n| \n\n| ![]({{ images_dir }}/spacer.gif) |
9
+ ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
10
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir
11
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
12
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
13
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
14
+ }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
15
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
16
+ |\n\n |\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
17
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n|
18
+ ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
19
+ }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
20
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir
21
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
22
+ |\n\n |\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
23
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
24
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n|
25
+ ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
26
+ }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
27
+ }}/spacer.gif) |\n\n |\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
28
+ }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
29
+ }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
30
+ }}/spacer.gif) |\n\n |   |\n\nHow many ways can a row measuring fifty units in length
31
+ be tiled?\n\nNOTE: This is related to [Problem 116](problem=116).\n\n"
@@ -3,9 +3,9 @@
3
3
  :name: Square remainders
4
4
  :url: http://projecteuler.net/problem=120
5
5
  :content: |+
6
- Let _r_ be the remainder when (_a_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1)<sup><i>n</i></sup> + (_a_+1)<sup><i>n</i></sup> is divided by _a_<sup>2</sup>.
6
+ Let _r_ be the remainder when (_a_ ![−]({{ images_dir }}/symbol_minus.gif)1)<sup><i>n</i></sup> + (_a_+1)<sup><i>n</i></sup> is divided by _a_<sup>2</sup>.
7
7
 
8
- For example, if _a_ = 7 and _n_ = 3, then _r_ = 42: 6<sup>3</sup> + 8<sup>3</sup> = 728 ![≡](/home/will/src/euler-manager/config/../data/images/symbol_cong.gif) 42 mod 49. And as _n_ varies, so too will _r_, but for _a_ = 7 it turns out that _r_<sub>max</sub> = 42.
8
+ For example, if _a_ = 7 and _n_ = 3, then _r_ = 42: 6<sup>3</sup> + 8<sup>3</sup> = 728 ![≡]({{ images_dir }}/symbol_cong.gif) 42 mod 49. And as _n_ varies, so too will _r_, but for _a_ = 7 it turns out that _r_<sub>max</sub> = 42.
9
9
 
10
- For 3 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _a_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1000, find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) _r_<sub>max</sub>.
10
+ For 3 ![≤]({{ images_dir }}/symbol_le.gif) _a_ ![≤]({{ images_dir }}/symbol_le.gif) 1000, find ![∑]({{ images_dir }}/symbol_sum.gif) _r_<sub>max</sub>.
11
11
 
@@ -3,23 +3,21 @@
3
3
  :name: Efficient exponentiation
4
4
  :url: http://projecteuler.net/problem=122
5
5
  :content: "The most naive way of computing _n_<sup>15</sup> requires fourteen multiplications:\n\n_n_
6
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) _n_ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
7
- ... ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) _n_
8
- = _n_<sup>15</sup>\n\nBut using a \"binary\" method you can compute it in six multiplications:\n\n_n_
9
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) _n_ =
10
- _n_<sup>2</sup> \n_n_<sup>2</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
11
- _n_<sup>2</sup> = _n_<sup>4</sup> \n_n_<sup>4</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
12
- _n_<sup>4</sup> = _n_<sup>8</sup> \n_n_<sup>8</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
13
- _n_<sup>4</sup> = _n_<sup>12</sup> \n_n_<sup>12</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
14
- _n_<sup>2</sup> = _n_<sup>14</sup> \n_n_<sup>14</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
15
- _n_ = _n_<sup>15</sup>\n\nHowever it is yet possible to compute it in only five
16
- multiplications:\n\n_n_ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
17
- _n_ = _n_<sup>2</sup> \n_n_<sup>2</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
18
- _n_ = _n_<sup>3</sup> \n_n_<sup>3</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
19
- _n_<sup>3</sup> = _n_<sup>6</sup> \n_n_<sup>6</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
20
- _n_<sup>6</sup> = _n_<sup>12</sup> \n_n_<sup>12</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
21
- _n_<sup>3</sup> = _n_<sup>15</sup>\n\nWe shall define m(_k_) to be the minimum number
22
- of multiplications to compute _n_<sup><i>k</i></sup>; for example m(15) = 5.\n\nFor
23
- 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _k_ ![](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
24
- 200, find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)
25
- m(_k_).\n\n"
6
+ ![×]({{ images_dir }}/symbol_times.gif) _n_ ![×]({{ images_dir }}/symbol_times.gif)
7
+ ... ![×]({{ images_dir }}/symbol_times.gif) _n_ = _n_<sup>15</sup>\n\nBut using
8
+ a \"binary\" method you can compute it in six multiplications:\n\n_n_ ![×]({{ images_dir
9
+ }}/symbol_times.gif) _n_ = _n_<sup>2</sup> \n_n_<sup>2</sup> ![×]({{ images_dir
10
+ }}/symbol_times.gif) _n_<sup>2</sup> = _n_<sup>4</sup> \n_n_<sup>4</sup> ![×]({{
11
+ images_dir }}/symbol_times.gif) _n_<sup>4</sup> = _n_<sup>8</sup> \n_n_<sup>8</sup>
12
+ ![×]({{ images_dir }}/symbol_times.gif) _n_<sup>4</sup> = _n_<sup>12</sup> \n_n_<sup>12</sup>
13
+ ![×]({{ images_dir }}/symbol_times.gif) _n_<sup>2</sup> = _n_<sup>14</sup> \n_n_<sup>14</sup>
14
+ ![×]({{ images_dir }}/symbol_times.gif) _n_ = _n_<sup>15</sup>\n\nHowever it is
15
+ yet possible to compute it in only five multiplications:\n\n_n_ ![×]({{ images_dir
16
+ }}/symbol_times.gif) _n_ = _n_<sup>2</sup> \n_n_<sup>2</sup> ![×]({{ images_dir
17
+ }}/symbol_times.gif) _n_ = _n_<sup>3</sup> \n_n_<sup>3</sup> ![×]({{ images_dir
18
+ }}/symbol_times.gif) _n_<sup>3</sup> = _n_<sup>6</sup> \n_n_<sup>6</sup> ![×]({{
19
+ images_dir }}/symbol_times.gif) _n_<sup>6</sup> = _n_<sup>12</sup> \n_n_<sup>12</sup>
20
+ ![×]({{ images_dir }}/symbol_times.gif) _n_<sup>3</sup> = _n_<sup>15</sup>\n\nWe
21
+ shall define m(_k_) to be the minimum number of multiplications to compute _n_<sup><i>k</i></sup>;
22
+ for example m(15) = 5.\n\nFor 1 ![≤]({{ images_dir }}/symbol_le.gif) _k_ ![≤]({{
23
+ images_dir }}/symbol_le.gif) 200, find ![]({{ images_dir }}/symbol_sum.gif) m(_k_).\n\n"
@@ -3,9 +3,9 @@
3
3
  :name: Prime square remainders
4
4
  :url: http://projecteuler.net/problem=123
5
5
  :content: |+
6
- Let _p_<sub>n</sub> be the _n_th prime: 2, 3, 5, 7, 11, ..., and let _r_ be the remainder when (_p_<sub>n</sub> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1)<sup><i>n</i></sup> + (_p_<sub>n</sub>+1)<sup><i>n</i></sup> is divided by _p_<sub>n</sub><sup>2</sup>.
6
+ Let _p_<sub>n</sub> be the _n_th prime: 2, 3, 5, 7, 11, ..., and let _r_ be the remainder when (_p_<sub>n</sub> ![−]({{ images_dir }}/symbol_minus.gif)1)<sup><i>n</i></sup> + (_p_<sub>n</sub>+1)<sup><i>n</i></sup> is divided by _p_<sub>n</sub><sup>2</sup>.
7
7
 
8
- For example, when _n_ = 3, _p_<sub>3</sub> = 5, and 4<sup>3</sup> + 6<sup>3</sup> = 280 ![≡](/home/will/src/euler-manager/config/../data/images/symbol_cong.gif) 5 mod 25.
8
+ For example, when _n_ = 3, _p_<sub>3</sub> = 5, and 4<sup>3</sup> + 6<sup>3</sup> = 280 ![≡]({{ images_dir }}/symbol_cong.gif) 5 mod 25.
9
9
 
10
10
  The least value of _n_ for which the remainder first exceeds 10<sup>9</sup> is 7037.
11
11
 
@@ -3,26 +3,21 @@
3
3
  :name: Ordered radicals
4
4
  :url: http://projecteuler.net/problem=124
5
5
  :content: "The radical of _n_, rad(_n_), is the product of the distinct prime factors
6
- of _n_. For example, 504 = 2<sup>3</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
7
- 3<sup>2</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
8
- 7, so rad(504) = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
9
- 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 7 =
10
- 42.\n\nIf we calculate rad(_n_) for _1_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
11
- _n_ ![](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10, then
12
- sort them on rad(_n_), and sorting on _n_ if the radical values are equal, we get:\n\n|
13
- \n**Unsorted**\n |   | \n**Sorted**\n |\n| \n ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
14
- \ \n**_n_**\n | \n ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
15
- \ \n**rad(_n_)**\n | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
16
- \ \n | \n ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) \n**_n_**\n
17
- | \n ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) \n**rad(_n_)**\n
18
- | \n ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) \n**k**\n
19
- |\n| \n1\n | \n1\n |   | \n1\n | \n1\n | \n1\n |\n| \n2\n | \n2\n |   | \n2\n |
20
- \n2\n | \n2\n |\n| \n3\n | \n3\n |   | \n4\n | \n2\n | \n3\n |\n| \n4\n | \n2\n
21
- |   | \n8\n | \n2\n | \n4\n |\n| \n5\n | \n5\n |   | \n3\n | \n3\n | \n5\n |\n|
22
- \n6\n | \n6\n |   | \n9\n | \n3\n | \n6\n |\n| \n7\n | \n7\n |   | \n5\n | \n5\n
23
- | \n7\n |\n| \n8\n | \n2\n |   | \n6\n | \n6\n | \n8\n |\n| \n9\n | \n3\n |   |
24
- \n7\n | \n7\n | \n9\n |\n| \n10\n | \n10\n |   | \n10\n | \n10\n | \n10\n |\n\nLet
25
- E(_k_) be the _k_th element in the sorted _n_ column; for example, E(4) = 8 and
26
- E(6) = 9.\n\nIf rad(_n_) is sorted for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
27
- _n_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 100000,
28
- find E(10000).\n\n"
6
+ of _n_. For example, 504 = 2<sup>3</sup> ![×]({{ images_dir }}/symbol_times.gif)
7
+ 3<sup>2</sup> ![×]({{ images_dir }}/symbol_times.gif) 7, so rad(504) = 2 ![×]({{
8
+ images_dir }}/symbol_times.gif) 3 ![×]({{ images_dir }}/symbol_times.gif) 7 = 42.\n\nIf
9
+ we calculate rad(_n_) for _1_ ![]({{ images_dir }}/symbol_le.gif) _n_ ![≤]({{ images_dir
10
+ }}/symbol_le.gif) 10, then sort them on rad(_n_), and sorting on _n_ if the radical
11
+ values are equal, we get:\n\n| \n**Unsorted**\n |   | \n**Sorted**\n |\n| \n ![]({{
12
+ images_dir }}/spacer.gif) \n**_n_**\n | \n ![]({{ images_dir }}/spacer.gif) \n**rad(_n_)**\n
13
+ | ![]({{ images_dir }}/spacer.gif) \n | \n ![]({{ images_dir }}/spacer.gif) \n**_n_**\n
14
+ | \n ![]({{ images_dir }}/spacer.gif) \n**rad(_n_)**\n | \n ![]({{ images_dir }}/spacer.gif)
15
+ \ \n**k**\n |\n| \n1\n | \n1\n |   | \n1\n | \n1\n | \n1\n |\n| \n2\n | \n2\n |
16
+   | \n2\n | \n2\n | \n2\n |\n| \n3\n | \n3\n |   | \n4\n | \n2\n | \n3\n |\n| \n4\n
17
+ | \n2\n |   | \n8\n | \n2\n | \n4\n |\n| \n5\n | \n5\n |   | \n3\n | \n3\n | \n5\n
18
+ |\n| \n6\n | \n6\n |   | \n9\n | \n3\n | \n6\n |\n| \n7\n | \n7\n |   | \n5\n |
19
+ \n5\n | \n7\n |\n| \n8\n | \n2\n |   | \n6\n | \n6\n | \n8\n |\n| \n9\n | \n3\n
20
+ |   | \n7\n | \n7\n | \n9\n |\n| \n10\n | \n10\n |   | \n10\n | \n10\n | \n10\n
21
+ |\n\nLet E(_k_) be the _k_th element in the sorted _n_ column; for example, E(4)
22
+ = 8 and E(6) = 9.\n\nIf rad(_n_) is sorted for 1 ![≤]({{ images_dir }}/symbol_le.gif)
23
+ _n_ ![≤]({{ images_dir }}/symbol_le.gif) 100000, find E(10000).\n\n"
@@ -3,14 +3,13 @@
3
3
  :name: Cuboid layers
4
4
  :url: http://projecteuler.net/problem=126
5
5
  :content: "The minimum number of cubes to cover every visible face on a cuboid measuring
6
- 3 x 2 x 1 is twenty-two.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_126.gif)
7
- \ \n\nIf we then add a second layer to this solid it would require forty-six cubes
8
- to cover every visible face, the third layer would require seventy-eight cubes,
9
- and the fourth layer would require one-hundred and eighteen cubes to cover every
10
- visible face.\n\nHowever, the first layer on a cuboid measuring 5 x 1 x 1 also requires
11
- twenty-two cubes; similarly the first layer on cuboids measuring 5 x 3 x 1, 7 x 2 x 1,
12
- and 11 x 1 x 1 all contain forty-six cubes.\n\nWe shall define C(_n_) to represent
13
- the number of cuboids that contain _n_ cubes in one of its layers. So C(22) = 2,
14
- C(46) = 4, C(78) = 5, and C(118) = 8.\n\nIt turns out that 154 is the least value
15
- of _n_ for which C(_n_) = 10.\n\nFind the least value of _n_ for which C(_n_) =
16
- 1000.\n\n"
6
+ 3 x 2 x 1 is twenty-two.\n\n ![]({{ images_dir }}/p_126.gif) \n\nIf we then add
7
+ a second layer to this solid it would require forty-six cubes to cover every visible
8
+ face, the third layer would require seventy-eight cubes, and the fourth layer would
9
+ require one-hundred and eighteen cubes to cover every visible face.\n\nHowever,
10
+ the first layer on a cuboid measuring 5 x 1 x 1 also requires twenty-two cubes;
11
+ similarly the first layer on cuboids measuring 5 x 3 x 1, 7 x 2 x 1, and 11 x 1 x 1
12
+ all contain forty-six cubes.\n\nWe shall define C(_n_) to represent the number of
13
+ cuboids that contain _n_ cubes in one of its layers. So C(22) = 2, C(46) = 4, C(78)
14
+ = 5, and C(118) = 8.\n\nIt turns out that 154 is the least value of _n_ for which
15
+ C(_n_) = 10.\n\nFind the least value of _n_ for which C(_n_) = 1000.\n\n"
@@ -3,23 +3,23 @@
3
3
  :name: abc-hits
4
4
  :url: http://projecteuler.net/problem=127
5
5
  :content: |+
6
- The radical of _n_, rad(_n_), is the product of distinct prime factors of _n_. For example, 504 = 2<sup>3</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 3<sup>2</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 7, so rad(504) = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 7 = 42.
6
+ The radical of _n_, rad(_n_), is the product of distinct prime factors of _n_. For example, 504 = 2<sup>3</sup> ![×]({{ images_dir }}/symbol_times.gif) 3<sup>2</sup> ![×]({{ images_dir }}/symbol_times.gif) 7, so rad(504) = 2 ![×]({{ images_dir }}/symbol_times.gif) 3 ![×]({{ images_dir }}/symbol_times.gif) 7 = 42.
7
7
 
8
8
  We shall define the triplet of positive integers (_a_, _b_, _c_) to be an abc-hit if:
9
9
 
10
10
  1. GCD(_a,_ _b_) = GCD(_a_, _c_) = GCD(_b_, _c_) = 1
11
- 2. _a_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) _b_
11
+ 2. _a_ ![<]({{ images_dir }}/symbol_lt.gif) _b_
12
12
  3. _a_ + _b_ = _c_
13
- 4. rad(_abc_) ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) _c_
13
+ 4. rad(_abc_) ![<]({{ images_dir }}/symbol_lt.gif) _c_
14
14
 
15
15
  For example, (5, 27, 32) is an abc-hit, because:
16
16
 
17
17
  1. GCD(5, 27) = GCD(5, 32) = GCD(27, 32) = 1
18
- 2. 5 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 27
18
+ 2. 5 ![<]({{ images_dir }}/symbol_lt.gif) 27
19
19
  3. 5 + 27 = 32
20
- 4. rad(4320) = 30 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 32
20
+ 4. rad(4320) = 30 ![<]({{ images_dir }}/symbol_lt.gif) 32
21
21
 
22
- It turns out that abc-hits are quite rare and there are only thirty-one abc-hits for _c_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 1000, with ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)_c_ = 12523.
22
+ It turns out that abc-hits are quite rare and there are only thirty-one abc-hits for _c_ ![<]({{ images_dir }}/symbol_lt.gif) 1000, with ![∑]({{ images_dir }}/symbol_sum.gif)_c_ = 12523.
23
23
 
24
- Find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)_c_ for _c_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 120000.
24
+ Find ![∑]({{ images_dir }}/symbol_sum.gif)_c_ for _c_ ![<]({{ images_dir }}/symbol_lt.gif) 120000.
25
25
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  New rings are added in the same fashion, with the next rings being numbered 8 to 19, 20 to 37, 38 to 61, and so on. The diagram below shows the first three rings.
9
9
 
10
- ![](/home/will/src/euler-manager/config/../data/images/p_128.gif)
10
+ ![]({{ images_dir }}/p_128.gif)
11
11
 
12
12
  By finding the difference between tile _n_ and each its six neighbours we shall define PD(_n_) to be the number of those differences which are prime.
13
13
 
@@ -7,10 +7,9 @@
7
7
  _n_ is a positive integer and GCD(_n_, 10) = 1, it can be shown that there always
8
8
  exists a value, _k_, for which R(_k_) is divisible by _n_, and let A(_n_) be the
9
9
  least such value of _k_; for example, A(7) = 6 and A(41) = 5.\n\nYou are given that
10
- for all primes, _p_ ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
11
- 5, that _p_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
12
- 1 is divisible by A(_p_). For example, when _p_ = 41, A(41) = 5, and 40 is divisible
13
- by 5.\n\nHowever, there are rare composite values for which this is also true; the
14
- first five examples being 91, 259, 451, 481, and 703.\n\nFind the sum of the first
15
- twenty-five composite values of _n_ for which \nGCD(_n_, 10) = 1 and _n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
16
- 1 is divisible by A(_n_).\n\n"
10
+ for all primes, _p_ ![>]({{ images_dir }}/symbol_gt.gif) 5, that _p_ ![−]({{ images_dir
11
+ }}/symbol_minus.gif) 1 is divisible by A(_p_). For example, when _p_ = 41, A(41)
12
+ = 5, and 40 is divisible by 5.\n\nHowever, there are rare composite values for which
13
+ this is also true; the first five examples being 91, 259, 451, 481, and 703.\n\nFind
14
+ the sum of the first twenty-five composite values of _n_ for which \nGCD(_n_, 10)
15
+ = 1 and _n_ ![−]({{ images_dir }}/symbol_minus.gif) 1 is divisible by A(_n_).\n\n"
@@ -5,7 +5,7 @@
5
5
  :content: |+
6
6
  There are some prime values, _p_, for which there exists a positive integer, _n_, such that the expression _n_<sup>3</sup> + _n_<sup>2</sup>_p_ is a perfect cube.
7
7
 
8
- For example, when _p_ = 19, 8<sup>3</sup> + 8<sup>2</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)19 = 12<sup>3</sup>.
8
+ For example, when _p_ = 19, 8<sup>3</sup> + 8<sup>2</sup> ![×]({{ images_dir }}/symbol_times.gif)19 = 12<sup>3</sup>.
9
9
 
10
10
  What is perhaps most surprising is that for each prime with this property the value of _n_ is unique, and there are only four such primes below one-hundred.
11
11
 
@@ -5,7 +5,7 @@
5
5
  :content: |+
6
6
  A number consisting entirely of ones is called a repunit. We shall define R(_k_) to be a repunit of length _k_.
7
7
 
8
- For example, R(10) = 1111111111 = 11 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)41 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)271 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)9091, and the sum of these prime factors is 9414.
8
+ For example, R(10) = 1111111111 = 11 ![×]({{ images_dir }}/symbol_times.gif)41 ![×]({{ images_dir }}/symbol_times.gif)271 ![×]({{ images_dir }}/symbol_times.gif)9091, and the sum of these prime factors is 9414.
9
9
 
10
10
  Find the sum of the first forty prime factors of R(10<sup>9</sup>).
11
11
 
@@ -5,7 +5,7 @@
5
5
  :content: |+
6
6
  Consider the consecutive primes _p_<sub>1</sub> = 19 and _p_<sub>2</sub> = 23. It can be verified that 1219 is the smallest number such that the last digits are formed by _p_<sub>1</sub> whilst also being divisible by _p_<sub>2</sub>.
7
7
 
8
- In fact, with the exception of _p_<sub>1</sub> = 3 and _p_<sub>2</sub> = 5, for every pair of consecutive primes, _p_<sub>2</sub> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) _p_<sub>1</sub>, there exist values of _n_ for which the last digits are formed by _p_<sub>1</sub> and _n_ is divisible by _p_<sub>2</sub>. Let _S_ be the smallest of these values of _n_.
8
+ In fact, with the exception of _p_<sub>1</sub> = 3 and _p_<sub>2</sub> = 5, for every pair of consecutive primes, _p_<sub>2</sub> ![>]({{ images_dir }}/symbol_gt.gif) _p_<sub>1</sub>, there exist values of _n_ for which the last digits are formed by _p_<sub>1</sub> and _n_ is divisible by _p_<sub>2</sub>. Let _S_ be the smallest of these values of _n_.
9
9
 
10
- Find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) _S_ for every pair of consecutive primes with 5 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _p_<sub>1</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1000000.
10
+ Find ![∑]({{ images_dir }}/symbol_sum.gif) _S_ for every pair of consecutive primes with 5 ![≤]({{ images_dir }}/symbol_le.gif) _p_<sub>1</sub> ![≤]({{ images_dir }}/symbol_le.gif) 1000000.
11
11
 
@@ -3,9 +3,9 @@
3
3
  :name: Same differences
4
4
  :url: http://projecteuler.net/problem=135
5
5
  :content: |+
6
- Given the positive integers, _x_, _y_, and _z_, are consecutive terms of an arithmetic progression, the least value of the positive integer, _n_, for which the equation, _x_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _y_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _z_<sup>2</sup> = _n_, has exactly two solutions is _n_ = 27:
6
+ Given the positive integers, _x_, _y_, and _z_, are consecutive terms of an arithmetic progression, the least value of the positive integer, _n_, for which the equation, _x_<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) _y_<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) _z_<sup>2</sup> = _n_, has exactly two solutions is _n_ = 27:
7
7
 
8
- 34<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 27<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 20<sup>2</sup> = 12<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 9<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 6<sup>2</sup> = 27
8
+ 34<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) 27<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) 20<sup>2</sup> = 12<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) 9<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) 6<sup>2</sup> = 27
9
9
 
10
10
  It turns out that _n_ = 1155 is the least value which has exactly ten solutions.
11
11
 
@@ -3,9 +3,9 @@
3
3
  :name: Singleton difference
4
4
  :url: http://projecteuler.net/problem=136
5
5
  :content: |+
6
- The positive integers, _x_, _y_, and _z_, are consecutive terms of an arithmetic progression. Given that _n_ is a positive integer, the equation, _x_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _y_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _z_<sup>2</sup> = _n_, has exactly one solution when _n_ = 20:
6
+ The positive integers, _x_, _y_, and _z_, are consecutive terms of an arithmetic progression. Given that _n_ is a positive integer, the equation, _x_<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) _y_<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) _z_<sup>2</sup> = _n_, has exactly one solution when _n_ = 20:
7
7
 
8
- 13<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 10<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 7<sup>2</sup> = 20
8
+ 13<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) 10<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) 7<sup>2</sup> = 20
9
9
 
10
10
  In fact there are twenty-five values of _n_ below one hundred for which the equation has a unique solution.
11
11
 
@@ -14,11 +14,11 @@
14
14
  The corresponding values of _x_ for the first five natural numbers are shown below.
15
15
 
16
16
  | **_x_** | **A<sub>F</sub>(_x_)** |
17
- | ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1 | 1 |
17
+ | ![√]({{ images_dir }}/symbol_radic.gif)2 ![−]({{ images_dir }}/symbol_minus.gif)1 | 1 |
18
18
  | 1/2 | 2 |
19
- | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)13 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2)/3 | 3 |
20
- | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)89 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)5)/8 | 4 |
21
- | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)34 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)3)/5 | 5 |
19
+ | ( ![√]({{ images_dir }}/symbol_radic.gif)13 ![−]({{ images_dir }}/symbol_minus.gif)2)/3 | 3 |
20
+ | ( ![√]({{ images_dir }}/symbol_radic.gif)89 ![−]({{ images_dir }}/symbol_minus.gif)5)/8 | 4 |
21
+ | ( ![√]({{ images_dir }}/symbol_radic.gif)34 ![−]({{ images_dir }}/symbol_minus.gif)3)/5 | 5 |
22
22
 
23
23
  We shall call A<sub>F</sub>(_x_) a golden nugget if _x_ is rational, because they become increasingly rarer; for example, the 10th golden nugget is 74049690.
24
24
 
@@ -5,11 +5,11 @@
5
5
  :content: |+
6
6
  Consider the isosceles triangle with base length, _b_ = 16, and legs, L = 17.
7
7
 
8
- ![](/home/will/src/euler-manager/config/../data/images/p_138.gif)
8
+ ![]({{ images_dir }}/p_138.gif)
9
9
 
10
- By using the Pythagorean theorem it can be seen that the height of the triangle, _h_ = ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)(17<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 8<sup>2</sup>) = 15, which is one less than the base length.
10
+ By using the Pythagorean theorem it can be seen that the height of the triangle, _h_ = ![√]({{ images_dir }}/symbol_radic.gif)(17<sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif) 8<sup>2</sup>) = 15, which is one less than the base length.
11
11
 
12
- With _b_ = 272 and L = 305, we get _h_ = 273, which is one more than the base length, and this is the second smallest isosceles triangle with the property that _h_ = _b_ ![±](/home/will/src/euler-manager/config/../data/images/symbol_plusmn.gif) 1.
12
+ With _b_ = 272 and L = 305, we get _h_ = 273, which is one more than the base length, and this is the second smallest isosceles triangle with the property that _h_ = _b_ ![±]({{ images_dir }}/symbol_plusmn.gif) 1.
13
13
 
14
- Find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) L for the twelve smallest isosceles triangles for which _h_ = _b_ ![±](/home/will/src/euler-manager/config/../data/images/symbol_plusmn.gif) 1 and _b_, L are positive integers.
14
+ Find ![∑]({{ images_dir }}/symbol_sum.gif) L for the twelve smallest isosceles triangles for which _h_ = _b_ ![±]({{ images_dir }}/symbol_plusmn.gif) 1 and _b_, L are positive integers.
15
15
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  For example, (3, 4, 5) triangles can be placed together to form a 5 by 5 square with a 1 by 1 hole in the middle and it can be seen that the 5 by 5 square can be tiled with twenty-five 1 by 1 squares.
9
9
 
10
- ![](/home/will/src/euler-manager/config/../data/images/p_139.gif)
10
+ ![]({{ images_dir }}/p_139.gif)
11
11
 
12
12
  However, if (5, 12, 13) triangles were used then the hole would measure 7 by 7 and these could not be used to tile the 13 by 13 square.
13
13
 
data/data/problems/14.yml CHANGED
@@ -3,16 +3,15 @@
3
3
  :name: Longest Collatz sequence
4
4
  :url: http://projecteuler.net/problem=14
5
5
  :content: "The following iterative sequence is defined for the set of positive integers:\n\n<var>n</var>
6
- ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) <var>n</var>/2
7
- (<var>n</var> is even) \n<var>n</var> ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
8
- 3<var>n</var> + 1 (<var>n</var> is odd)\n\nUsing the rule above and starting with
9
- 13, we generate the following sequence:\n\n13 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
10
- 40 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 20 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
11
- 10 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 5 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
12
- 16 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 8 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
13
- 4 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 2 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
14
- 1\n\nIt can be seen that this sequence (starting at 13 and finishing at 1) contains
15
- 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that
16
- all starting numbers finish at 1.\n\nWhich starting number, under one million, produces
17
- the longest chain?\n\n**NOTE:** Once the chain starts the terms are allowed to go
18
- above one million.\n\n"
6
+ ![→]({{ images_dir }}/symbol_maps.gif) <var>n</var>/2 (<var>n</var> is even) \n<var>n</var>
7
+ ![→]({{ images_dir }}/symbol_maps.gif) 3<var>n</var> + 1 (<var>n</var> is odd)\n\nUsing
8
+ the rule above and starting with 13, we generate the following sequence:\n\n13 ![→]({{
9
+ images_dir }}/symbol_maps.gif) 40 ![→]({{ images_dir }}/symbol_maps.gif) 20 ![→]({{
10
+ images_dir }}/symbol_maps.gif) 10 ![→]({{ images_dir }}/symbol_maps.gif) 5 ![→]({{
11
+ images_dir }}/symbol_maps.gif) 16 ![→]({{ images_dir }}/symbol_maps.gif) 8 ![→]({{
12
+ images_dir }}/symbol_maps.gif) 4 ![→]({{ images_dir }}/symbol_maps.gif) 2 ![→]({{
13
+ images_dir }}/symbol_maps.gif) 1\n\nIt can be seen that this sequence (starting
14
+ at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet
15
+ (Collatz Problem), it is thought that all starting numbers finish at 1.\n\nWhich
16
+ starting number, under one million, produces the longest chain?\n\n**NOTE:** Once
17
+ the chain starts the terms are allowed to go above one million.\n\n"
@@ -10,10 +10,10 @@
10
10
  The corresponding values of _x_ for the first five natural numbers are shown below.
11
11
 
12
12
  | **_x_** | **A<sub>G</sub>(_x_)** |
13
- | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)5 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1)/4 | 1 |
13
+ | ( ![√]({{ images_dir }}/symbol_radic.gif)5 ![−]({{ images_dir }}/symbol_minus.gif)1)/4 | 1 |
14
14
  | 2/5 | 2 |
15
- | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)22 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2)/6 | 3 |
16
- | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)137 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)5)/14 | 4 |
15
+ | ( ![√]({{ images_dir }}/symbol_radic.gif)22 ![−]({{ images_dir }}/symbol_minus.gif)2)/6 | 3 |
16
+ | ( ![√]({{ images_dir }}/symbol_radic.gif)137 ![−]({{ images_dir }}/symbol_minus.gif)5)/14 | 4 |
17
17
  | 1/2 | 5 |
18
18
 
19
19
  We shall call A<sub>G</sub>(_x_) a golden nugget if _x_ is rational, because they become increasingly rarer; for example, the 20th golden nugget is 211345365.
@@ -3,5 +3,5 @@
3
3
  :name: Perfect Square Collection
4
4
  :url: http://projecteuler.net/problem=142
5
5
  :content: |+
6
- Find the smallest x + y + z with integers x ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) y ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) z ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) 0 such that x + y, x ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) y, x + z, x ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) z, y + z, y ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) z are all perfect squares.
6
+ Find the smallest x + y + z with integers x ![>]({{ images_dir }}/symbol_gt.gif) y ![>]({{ images_dir }}/symbol_gt.gif) z ![>]({{ images_dir }}/symbol_gt.gif) 0 such that x + y, x ![−]({{ images_dir }}/symbol_minus.gif) y, x + z, x ![−]({{ images_dir }}/symbol_minus.gif) z, y + z, y ![−]({{ images_dir }}/symbol_minus.gif) z are all perfect squares.
7
7
 
@@ -9,9 +9,9 @@
9
9
 
10
10
  Torricelli was able to prove that if equilateral triangles AOB, BNC and AMC are constructed on each side of triangle ABC, the circumscribed circles of AOB, BNC, and AMC will intersect at a single point, T, inside the triangle. Moreover he proved that T, called the Torricelli/Fermat point, minimises p + q + r. Even more remarkable, it can be shown that when the sum is minimised, AN = BM = CO = p + q + r and that AN, BM and CO also intersect at T.
11
11
 
12
- ![](/home/will/src/euler-manager/config/../data/images/p_143_torricelli.gif)
12
+ ![]({{ images_dir }}/p_143_torricelli.gif)
13
13
 
14
14
  If the sum is minimised and a, b, c, p, q and r are all positive integers we shall call triangle ABC a Torricelli triangle. For example, a = 399, b = 455, c = 511 is an example of a Torricelli triangle, with p + q + r = 784.
15
15
 
16
- Find the sum of all distinct values of p + q + r ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 120000 for Torricelli triangles.
16
+ Find the sum of all distinct values of p + q + r ![≤]({{ images_dir }}/symbol_le.gif) 120000 for Torricelli triangles.
17
17
 
@@ -7,9 +7,9 @@
7
7
 
8
8
  The specific white cell we will be considering is an ellipse with the equation 4_x_<sup>2</sup> + _y_<sup>2</sup> = 100
9
9
 
10
- The section corresponding to ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)0.01 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _x_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) +0.01 at the top is missing, allowing the light to enter and exit through the hole.
10
+ The section corresponding to ![−]({{ images_dir }}/symbol_minus.gif)0.01 ![≤]({{ images_dir }}/symbol_le.gif) _x_ ![≤]({{ images_dir }}/symbol_le.gif) +0.01 at the top is missing, allowing the light to enter and exit through the hole.
11
11
 
12
- ![](/home/will/src/euler-manager/config/../data/images/p_144_1.gif) ![](/home/will/src/euler-manager/config/../data/images/p_144_2.gif)
12
+ ![]({{ images_dir }}/p_144_1.gif) ![]({{ images_dir }}/p_144_2.gif)
13
13
 
14
14
  The light beam in this problem starts at the point (0.0,10.1) just outside the white cell, and the beam first impacts the mirror at (1.4,-9.6).
15
15
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  In the figure on the left, the red line shows the first two points of contact between the laser beam and the wall of the white cell; the blue line shows the line tangent to the ellipse at the point of incidence of the first bounce.
19
19
 
20
- The slope _m_ of the tangent line at any point (_x_,_y_) of the given ellipse is: _m_ = ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)4_x_/_y_
20
+ The slope _m_ of the tangent line at any point (_x_,_y_) of the given ellipse is: _m_ = ![−]({{ images_dir }}/symbol_minus.gif)4_x_/_y_
21
21
 
22
22
  The normal line is perpendicular to this tangent line at the point of incidence.
23
23
 
@@ -3,7 +3,7 @@
3
3
  :name: Rectangles in cross-hatched grids
4
4
  :url: http://projecteuler.net/problem=147
5
5
  :content: "In a 3x2 cross-hatched grid, a total of 37 different rectangles could be
6
- situated within that grid as indicated in the sketch.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_147.gif)\n\nThere
6
+ situated within that grid as indicated in the sketch.\n\n ![]({{ images_dir }}/p_147.gif)\n\nThere
7
7
  are 5 grids smaller than 3x2, vertical and horizontal dimensions being important,
8
8
  i.e. 1x1, 2x1, 3x1, 1x2 and 2x2. If each of them is cross-hatched, the following
9
9
  number of different rectangles could be situated within those smaller grids:\n\n1x1:
@@ -13,19 +13,17 @@
13
13
  width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">4</td>\n<td> 
14
14
  8</td>\n</tr>\n</tbody>\n\nNow, let us repeat the search, but on a much larger scale:\n\nFirst,
15
15
  generate four million pseudo-random numbers using a specific form of what is known
16
- as a \"Lagged Fibonacci Generator\":\n\nFor 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
17
- _k_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 55, _s_<sub><i>k</i></sub>
18
- = [100003 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
19
- 200003_k_ + 300007_k_<sup>3</sup>] (modulo 1000000) ![](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
20
- 500000. \n\rFor 56 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
21
- _k_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 4000000,
22
- _s_<sub><i>k</i></sub> = [_s_<sub><i>k<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
23
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">24</i></sub>
24
- + _s_<sub><i>k<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\"
25
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">55</i></sub>
26
- + 1000000] (modulo 1000000) ![](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
27
- 500000.\n\nThus, _s_<sub>10</sub> = ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)393027
28
- and _s_<sub>100</sub> = 86613.\n\nThe terms of _s_ are then arranged in a 2000 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2000
16
+ as a \"Lagged Fibonacci Generator\":\n\nFor 1 ![≤]({{ images_dir }}/symbol_le.gif)
17
+ _k_ ![≤]({{ images_dir }}/symbol_le.gif) 55, _s_<sub><i>k</i></sub> = [100003 ![−]({{
18
+ images_dir }}/symbol_minus.gif) 200003_k_ + 300007_k_<sup>3</sup>] (modulo 1000000)
19
+ ![−]({{ images_dir }}/symbol_minus.gif) 500000. \n\rFor 56 ![]({{ images_dir }}/symbol_le.gif)
20
+ _k_ ![≤]({{ images_dir }}/symbol_le.gif) 4000000, _s_<sub><i>k</i></sub> = [_s_<sub><i>k<img
21
+ src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
22
+ border=\"0\" style=\"vertical-align:middle;\">24</i></sub> + _s_<sub><i>k<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
23
+ width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">55</i></sub>
24
+ + 1000000] (modulo 1000000) ![−]({{ images_dir }}/symbol_minus.gif) 500000.\n\nThus,
25
+ _s_<sub>10</sub> = ![−]({{ images_dir }}/symbol_minus.gif)393027 and _s_<sub>100</sub>
26
+ = 86613.\n\nThe terms of _s_ are then arranged in a 2000 ![×]({{ images_dir }}/symbol_times.gif)2000
29
27
  table, using the first 2000 numbers to fill the first row (sequentially), the next
30
28
  2000 numbers to fill the second row, and so on.\n\nFinally, find the greatest sum
31
29
  of (any number of) adjacent entries in any direction (horizontal, vertical, diagonal
data/data/problems/15.yml CHANGED
@@ -3,9 +3,9 @@
3
3
  :name: Lattice paths
4
4
  :url: http://projecteuler.net/problem=15
5
5
  :content: |+
6
- Starting in the top left corner of a 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
6
+ Starting in the top left corner of a 2 ![×]({{ images_dir }}/symbol_times.gif)2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
7
7
 
8
- ![](/home/will/src/euler-manager/config/../data/images/p_015.gif)
8
+ ![]({{ images_dir }}/p_015.gif)
9
9
 
10
- How many such routes are there through a 20 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)20 grid?
10
+ How many such routes are there through a 20 ![×]({{ images_dir }}/symbol_times.gif)20 grid?
11
11