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
@@ -2,9 +2,8 @@
2
2
  :id: 223
3
3
  :name: Almost right-angled triangles I
4
4
  :url: http://projecteuler.net/problem=223
5
- :content: "Let us call an integer sided triangle with sides <var>a</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- <var>b</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
7
- <var>c</var> _barely acute_ if the sides satisfy \n <var>a</var><sup>2</sup> +
8
- <var>b</var><sup>2</sup> = <var>c</var><sup>2</sup> + 1.\n\nHow many barely acute
9
- triangles are there with perimeter ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
10
- 25,000,000?\n\n"
5
+ :content: "Let us call an integer sided triangle with sides <var>a</var> ![≤]({{ images_dir
6
+ }}/symbol_le.gif) <var>b</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>c</var>
7
+ _barely acute_ if the sides satisfy \n <var>a</var><sup>2</sup> + <var>b</var><sup>2</sup>
8
+ = <var>c</var><sup>2</sup> + 1.\n\nHow many barely acute triangles are there with
9
+ perimeter ![≤]({{ images_dir }}/symbol_le.gif) 25,000,000?\n\n"
@@ -2,9 +2,8 @@
2
2
  :id: 224
3
3
  :name: Almost right-angled triangles II
4
4
  :url: http://projecteuler.net/problem=224
5
- :content: "Let us call an integer sided triangle with sides <var>a</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- <var>b</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
7
- <var>c</var> _barely obtuse_ if the sides satisfy \n <var>a</var><sup>2</sup>
8
- + <var>b</var><sup>2</sup> = <var>c</var><sup>2</sup> - 1.\n\nHow many barely obtuse
9
- triangles are there with perimeter ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
10
- 75,000,000?\n\n"
5
+ :content: "Let us call an integer sided triangle with sides <var>a</var> ![≤]({{ images_dir
6
+ }}/symbol_le.gif) <var>b</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>c</var>
7
+ _barely obtuse_ if the sides satisfy \n <var>a</var><sup>2</sup> + <var>b</var><sup>2</sup>
8
+ = <var>c</var><sup>2</sup> - 1.\n\nHow many barely obtuse triangles are there with
9
+ perimeter ![≤]({{ images_dir }}/symbol_le.gif) 75,000,000?\n\n"
@@ -3,11 +3,11 @@
3
3
  :name: A Scoop of Blancmange
4
4
  :url: http://projecteuler.net/problem=226
5
5
  :content: "The _blancmange curve_ is the set of points (<var>x</var>,<var>y</var>)
6
- such that 0  ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>x</var>
7
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1 and ![](/home/will/src/euler-manager/config/../data/images/p_226_formula.gif)
8
- , \nwhere <var>s</var>(<var>x</var>) = the distance from <var>x</var> to the nearest
9
- integer.\n\nThe area under the blancmange curve is equal to ½, shown in pink in
10
- the diagram below.\n\n ![blancmange curve](/home/will/src/euler-manager/config/../data/images/p_226_scoop2.gif)\n\nLet
11
- <var>C</var> be the circle with centre (¼,&frac12) and radius ¼, shown in black
12
- in the diagram.\n\nWhat area under the blancmange curve is enclosed by <var>C</var>?
13
- \ \nGive your answer rounded to eight decimal places in the form _0.abcdefgh_\n\n"
6
+ such that 0  ![≤]({{ images_dir }}/symbol_le.gif) <var>x</var>  ![≤]({{ images_dir
7
+ }}/symbol_le.gif) 1 and ![]({{ images_dir }}/p_226_formula.gif) , \nwhere <var>s</var>(<var>x</var>)
8
+ = the distance from <var>x</var> to the nearest integer.\n\nThe area under the blancmange
9
+ curve is equal to ½, shown in pink in the diagram below.\n\n ![blancmange curve]({{
10
+ images_dir }}/p_226_scoop2.gif)\n\nLet <var>C</var> be the circle with centre (¼,&frac12)
11
+ and radius ¼, shown in black in the diagram.\n\nWhat area under the blancmange curve
12
+ is enclosed by <var>C</var>? \nGive your answer rounded to eight decimal places
13
+ in the form _0.abcdefgh_\n\n"
@@ -5,9 +5,8 @@
5
5
  :content: "Let <var>S</var><sub>n</sub> be the regular <var>n</var>-sided polygon
6
6
  – or _shape_ – whose vertices \r\r<var>v</var><sub><var>k</var></sub> (<var>k</var> = 1,2,…,<var>n</var>)
7
7
  have coordinates:\n\n| | <var>x</var><sub><var>k</var></sub>   =  \r cos( <sup>2<var>k</var>-1</sup>/<sub><var>n</var></sub>
8
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)180° )
9
- |\n| | <var>y</var><sub><var>k</var></sub>   =  \r sin( <sup>2<var>k</var>-1</sup>/<sub><var>n</var></sub>
10
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)180° )
8
+ ![×]({{ images_dir }}/symbol_times.gif)180° ) |\n| | <var>y</var><sub><var>k</var></sub>   =
9
+  \r sin( <sup>2<var>k</var>-1</sup>/<sub><var>n</var></sub> ![×]({{ images_dir }}/symbol_times.gif)180° )
11
10
  |\n\nEach <var>S</var><sub><var>n</var></sub> is to be interpreted as a filled shape
12
11
  consisting of all points on the perimeter and in the interior.\n\nThe _Minkowski
13
12
  sum_, <var>S</var>+<var>T</var>, of two shapes <var>S</var> and <var>T</var> is
@@ -15,6 +14,6 @@
15
14
  where point addition is performed coordinate-wise: \r\r(<var>u</var>, <var>v</var>)
16
15
  + (<var>x</var>, <var>y</var>) = (<var>u</var>+<var>x</var>, <var>v</var>+<var>y</var>).\n\nFor
17
16
  example, the sum of <var>S</var><sub>3</sub> and <var>S</var><sub>4</sub> is the
18
- six-sided shape shown in pink below:\n\n ![picture showing S_3 + S_4](/home/will/src/euler-manager/config/../data/images/p_228.png)\n\nHow
19
- many sides does <var>S</var><sub>1864</sub> + <var>S</var><sub>1865</sub> + … + <var>S</var><sub>1909</sub>
17
+ six-sided shape shown in pink below:\n\n ![picture showing S_3 + S_4]({{ images_dir
18
+ }}/p_228.png)\n\nHow many sides does <var>S</var><sub>1864</sub> + <var>S</var><sub>1865</sub> + … + <var>S</var><sub>1909</sub>
20
19
  have?\n\n"
@@ -3,20 +3,20 @@
3
3
  :name: Four Representations using Squares
4
4
  :url: http://projecteuler.net/problem=229
5
5
  :content: "Consider the number 3600. It is very special, because\n\n\r3600 = 48<sup>2</sup>
6
- +     36<sup>2</sup> \n \n \n\r3600 = 20<sup>2</sup> + 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)40<sup>2</sup>
7
- \ \n \n \n\r3600 = 30<sup>2</sup> + 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)30<sup>2</sup>
8
- \ \n \n \n\r3600 = 45<sup>2</sup> + 7 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)15<sup>2</sup>
6
+ +     36<sup>2</sup> \n \n \n\r3600 = 20<sup>2</sup> + 2 ![×]({{ images_dir }}/symbol_times.gif)40<sup>2</sup>
7
+ \ \n \n \n\r3600 = 30<sup>2</sup> + 3 ![×]({{ images_dir }}/symbol_times.gif)30<sup>2</sup>
8
+ \ \n \n \n\r3600 = 45<sup>2</sup> + 7 ![×]({{ images_dir }}/symbol_times.gif)15<sup>2</sup>
9
9
  \ \n \n \n\nSimilarly, we find that 88201 = 99<sup>2</sup> + 280<sup>2</sup> =
10
- 287<sup>2</sup> + 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)54<sup>2</sup>
11
- = 283<sup>2</sup> + 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)52<sup>2</sup>
12
- = 197<sup>2</sup> + 7 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)84<sup>2</sup>.\n\nIn
13
- 1747, Euler proved which numbers are representable as a sum of two squares.\rWe
14
- are interested in the numbers <var>n</var> which admit representations of all of
15
- the following four types:\n\n<var>n</var> = <var>a<sub>1</sub></var><sup>2</sup>
16
- +   <var>b<sub>1</sub></var><sup>2</sup> \n \n \n<var>n</var> = <var>a<sub>2</sub></var><sup>2</sup>
17
- + 2 <var>b<sub>2</sub></var><sup>2</sup> \n \n \n<var>n</var> = <var>a<sub>3</sub></var><sup>2</sup>
18
- + 3 <var>b<sub>3</sub></var><sup>2</sup> \n \n \n<var>n</var> = <var>a<sub>7</sub></var><sup>2</sup>
19
- + 7 <var>b<sub>7</sub></var><sup>2</sup>,\r\n\nwhere the <var>a</var><sub><var>k</var></sub>
20
- and <var>b</var><sub><var>k</var></sub> are positive integers.\n\nThere are 75373
21
- such numbers that do not exceed 10<sup>7</sup>. \n\r\rHow many such numbers are
22
- there that do not exceed 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)10<sup>9</sup>?\n\n"
10
+ 287<sup>2</sup> + 2 ![×]({{ images_dir }}/symbol_times.gif)54<sup>2</sup> = 283<sup>2</sup>
11
+ + 3 ![×]({{ images_dir }}/symbol_times.gif)52<sup>2</sup> = 197<sup>2</sup> + 7
12
+ ![×]({{ images_dir }}/symbol_times.gif)84<sup>2</sup>.\n\nIn 1747, Euler proved
13
+ which numbers are representable as a sum of two squares.\rWe are interested in the
14
+ numbers <var>n</var> which admit representations of all of the following four types:\n\n<var>n</var>
15
+ = <var>a<sub>1</sub></var><sup>2</sup> +   <var>b<sub>1</sub></var><sup>2</sup>
16
+ \ \n \n \n<var>n</var> = <var>a<sub>2</sub></var><sup>2</sup> + 2 <var>b<sub>2</sub></var><sup>2</sup>
17
+ \ \n \n \n<var>n</var> = <var>a<sub>3</sub></var><sup>2</sup> + 3 <var>b<sub>3</sub></var><sup>2</sup>
18
+ \ \n \n \n<var>n</var> = <var>a<sub>7</sub></var><sup>2</sup> + 7 <var>b<sub>7</sub></var><sup>2</sup>,\r\n\nwhere
19
+ the <var>a</var><sub><var>k</var></sub> and <var>b</var><sub><var>k</var></sub>
20
+ are positive integers.\n\nThere are 75373 such numbers that do not exceed 10<sup>7</sup>.
21
+ \ \n\r\rHow many such numbers are there that do not exceed 2 ![×]({{ images_dir
22
+ }}/symbol_times.gif)10<sup>9</sup>?\n\n"
@@ -13,7 +13,7 @@
13
13
  fifth term, which is 9.\n\nNow we use for A the first 100 digits of π behind the
14
14
  decimal point:\n\n14159265358979323846264338327950288419716939937510 \n\r58209749445923078164062862089986280348253421170679\n\nand
15
15
  for B the next hundred digits:\n\n82148086513282306647093844609550582231725359408128
16
- \ \n\r48111745028410270193852110555964462294895493038196 .\n\nFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)<sub><var>n</var>
17
- = 0,1,...,17</sub>   10<sup><var>n</var></sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
18
- D<sub>A,B</sub>((127+19<var>n</var>) ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)7<sup><var>n</var></sup>)
19
- .\n\n"
16
+ \ \n\r48111745028410270193852110555964462294895493038196 .\n\nFind ![∑]({{ images_dir
17
+ }}/symbol_sum.gif)<sub><var>n</var> = 0,1,...,17</sub>   10<sup><var>n</var></sup>
18
+ ![×]({{ images_dir }}/symbol_times.gif) D<sub>A,B</sub>((127+19<var>n</var>) ![×]({{
19
+ images_dir }}/symbol_times.gif)7<sup><var>n</var></sup>) .\n\n"
@@ -3,10 +3,9 @@
3
3
  :name: The prime factorisation of binomial coefficients
4
4
  :url: http://projecteuler.net/problem=231
5
5
  :content: "The binomial coefficient <sup>10</sup>C<sub>3</sub> = 120. \n\r120 = 2<sup>3</sup>
6
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
7
- 5 = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
8
- 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 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) 5, and
10
- 2 + 2 + 2 + 3 + 5 = 14. \n\rSo the sum of the terms in the prime factorisation
6
+ ![×]({{ images_dir }}/symbol_times.gif) 3 ![×]({{ images_dir }}/symbol_times.gif)
7
+ 5 = 2 ![×]({{ images_dir }}/symbol_times.gif) 2 ![×]({{ images_dir }}/symbol_times.gif)
8
+ 2 ![×]({{ images_dir }}/symbol_times.gif) 3 ![×]({{ images_dir }}/symbol_times.gif)
9
+ 5, and 2 + 2 + 2 + 3 + 5 = 14. \n\rSo the sum of the terms in the prime factorisation
11
10
  of <sup>10</sup>C<sub>3</sub> is 14.\r \n \n \n\rFind the sum of the terms in
12
11
  the prime factorisation of <sup>20000000</sup>C<sub>15000000</sub>.\n\n"
@@ -7,5 +7,5 @@
7
7
 
8
8
  It can be shown that <var>f</var>(10000) = 36.
9
9
 
10
- What is the sum of all positive integers <var>N</var>  ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>11</sup> such that <var>f</var>(<var>N</var>) = 420 ?
10
+ What is the sum of all positive integers <var>N</var>  ![≤]({{ images_dir }}/symbol_le.gif) 10<sup>11</sup> such that <var>f</var>(<var>N</var>) = 420 ?
11
11
 
@@ -2,17 +2,16 @@
2
2
  :id: 234
3
3
  :name: Semidivisible numbers
4
4
  :url: http://projecteuler.net/problem=234
5
- :content: "For an integer <var>n</var> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
6
- 4, we define the _lower prime square root_ of <var>n</var>, denoted by lps(<var>n</var>),
7
- as the largest prime ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
- ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)<var>n</var>
5
+ :content: "For an integer <var>n</var> ![≥]({{ images_dir }}/symbol_ge.gif) 4, we
6
+ define the _lower prime square root_ of <var>n</var>, denoted by lps(<var>n</var>),
7
+ as the largest prime ![≤]({{ images_dir }}/symbol_le.gif) ![√]({{ images_dir }}/symbol_radic.gif)<var>n</var>
9
8
  and the _upper prime square root_ of <var>n</var>, ups(<var>n</var>), as the smallest
10
- prime ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif) ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)<var>n</var>.\n\nSo,
9
+ prime ![≥]({{ images_dir }}/symbol_ge.gif) ![√]({{ images_dir }}/symbol_radic.gif)<var>n</var>.\n\nSo,
11
10
  for example, lps(4) = 2 = ups(4), lps(1000) = 31, ups(1000) = 37. \n\rLet us call
12
- an integer <var>n</var> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
13
- 4 _semidivisible_, if one of lps(<var>n</var>) and ups(<var>n</var>) divides <var>n</var>,
14
- but not both.\n\nThe sum of the semidivisible numbers not exceeding 15 is 30, the
15
- numbers are 8, 10 and 12. \n 15 is not semidivisible because it is a multiple of
16
- both lps(15) = 3 and ups(15) = 5. \n\rAs a further example, the sum of the 92 semidivisible
11
+ an integer <var>n</var> ![≥]({{ images_dir }}/symbol_ge.gif) 4 _semidivisible_,
12
+ if one of lps(<var>n</var>) and ups(<var>n</var>) divides <var>n</var>, but not
13
+ both.\n\nThe sum of the semidivisible numbers not exceeding 15 is 30, the numbers
14
+ are 8, 10 and 12. \n 15 is not semidivisible because it is a multiple of both lps(15)
15
+ = 3 and ups(15) = 5. \n\rAs a further example, the sum of the 92 semidivisible
17
16
  numbers up to 1000 is 34825.\n\nWhat is the sum of all semidivisible numbers not
18
17
  exceeding 999966663333 ?\n\n"
@@ -24,7 +24,7 @@
24
24
  found that each of the five per-product spoilage rates was worse (higher) for 'B'
25
25
  than for 'A' by the same factor (ratio of spoilage rates), <var>m</var>>1; and yet,
26
26
  paradoxically, the overall spoilage rate was worse for 'A' than for 'B', also by
27
- a factor of <var>m</var>.\n\nThere are thirty-five <var>m</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)1
28
- for which this surprising result could have occurred, the smallest of which is 1476/1475.\n\nWhat's
29
- the largest possible value of <var>m</var>? \n\rGive your answer as a fraction
30
- reduced to its lowest terms, in the form <var>u</var>/<var>v</var>.\n\n"
27
+ a factor of <var>m</var>.\n\nThere are thirty-five <var>m</var> ![>]({{ images_dir
28
+ }}/symbol_gt.gif)1 for which this surprising result could have occurred, the smallest
29
+ of which is 1476/1475.\n\nWhat's the largest possible value of <var>m</var>? \n\rGive
30
+ your answer as a fraction reduced to its lowest terms, in the form <var>u</var>/<var>v</var>.\n\n"
@@ -3,16 +3,16 @@
3
3
  :name: Tours on a 4 x n playing board
4
4
  :url: http://projecteuler.net/problem=237
5
5
  :content: |+
6
- Let T(_n_) be the number of tours over a 4 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) _n_ playing board such that:
6
+ Let T(_n_) be the number of tours over a 4 ![×]({{ images_dir }}/symbol_times.gif) _n_ playing board such that:
7
7
 
8
8
  - The tour starts in the top left corner.
9
9
  - The tour consists of moves that are up, down, left, or right one square.
10
10
  - The tour visits each square exactly once.
11
11
  - The tour ends in the bottom left corner.
12
12
 
13
- The diagram shows one tour over a 4 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 10 board:
13
+ The diagram shows one tour over a 4 ![×]({{ images_dir }}/symbol_times.gif) 10 board:
14
14
 
15
- ![](/home/will/src/euler-manager/config/../data/images/p_237.gif)
15
+ ![]({{ images_dir }}/p_237.gif)
16
16
 
17
17
  T(10) is 2329. What is T(10<sup>12</sup>) modulo 10<sup>8</sup>?
18
18
 
@@ -24,7 +24,6 @@
24
24
  **3** .\n\nNote that substring 025 starting at position **3** , has a sum of digits
25
25
  equal to 7, but there was an earlier substring (starting at position **1** ) with
26
26
  a sum of digits equal to 7, so <var>p</var>(7) = 1, _not_ 3.\n\nWe can verify that,
27
- for 0 k  ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>3</sup>,
28
- ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) <var>p</var>(<var>k</var>)
29
- = 4742.\n\nFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) <var>p</var>(<var>k</var>),
30
- for 0 k  ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 2·10<sup>15</sup>.\n\n"
27
+ for 0 k  ![≤]({{ images_dir }}/symbol_le.gif) 10<sup>3</sup>, ![∑]({{ images_dir
28
+ }}/symbol_sum.gif) <var>p</var>(<var>k</var>) = 4742.\n\nFind ![∑]({{ images_dir
29
+ }}/symbol_sum.gif) <var>p</var>(<var>k</var>), for 0 k  ![≤]({{ images_dir }}/symbol_le.gif) 2·10<sup>15</sup>.\n\n"
@@ -6,9 +6,9 @@
6
6
  all divisors of <var>n</var>, so e.g. σ(6) = 1 + 2 + 3 + 6 = 12.\n\nA perfect number,
7
7
  as you probably know, is a number with σ(<var>n</var>) = 2<var>n</var>.\n\n| Let
8
8
  us define the **perfection quotient** of a positive integer as | <var>p</var>(<var>n</var>)
9
- | =  | \nσ(<var>n</var>) \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
10
- \ \n<var>n</var>\n | . |\n\n<!--\r\n<p>Let us define the <b>perfection quotient</b>
11
- of a positive integer as <var>p</var>(<var>n</var>) = <font \"size=4\"> <sup>&sigma;(<var>n</var>)</sup>&frasl;<sub><var>n</var></sub></font>.</p>\r\n-->\n\nFind
12
- the sum of all positive integers <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
9
+ | =  | \nσ(<var>n</var>) \n ![]({{ images_dir }}/blackdot.gif) \n<var>n</var>\n
10
+ | . |\n\n<!--\r\n<p>Let us define the <b>perfection quotient</b> of a positive integer
11
+ as <var>p</var>(<var>n</var>) = <font \"size=4\"> <sup>&sigma;(<var>n</var>)</sup>&frasl;<sub><var>n</var></sub></font>.</p>\r\n-->\n\nFind
12
+ the sum of all positive integers <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)
13
13
  10<sup>18</sup> for which <var>p</var>(<var>n</var>) has the form <var>k</var> +
14
14
  <sup>1</sup>⁄<sub>2</sub>, where <var>k</var> is an integer.\n\n"
@@ -8,7 +8,7 @@
8
8
  having an odd sum of elements, i.e.: {1,2,4}, {1,3,5}, {2,3,4} and {2,4,5}.\n\nWhen
9
9
  all three values <var>n</var>, <var>k</var> and <var>f</var>(<var>n</var>,<var>k</var>)
10
10
  are odd, we say that they make \n\ran _odd-triplet_ [<var>n</var>,<var>k</var>,<var>f</var>(<var>n</var>,<var>k</var>)].\n\nThere
11
- are exactly five odd-triplets with <var>n</var>  ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10,
11
+ are exactly five odd-triplets with <var>n</var>  ![≤]({{ images_dir }}/symbol_le.gif) 10,
12
12
  namely: \n\r[1,1,<var>f</var>(1,1) = 1], [5,1,<var>f</var>(5,1) = 3], [5,5,<var>f</var>(5,5) = 1],
13
13
  [9,1,<var>f</var>(9,1) = 5] and [9,9,<var>f</var>(9,9) = 1].\n\nHow many odd-triplets
14
- are there with <var>n</var>  ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>12</sup> ?\n\n"
14
+ are there with <var>n</var>  ![≤]({{ images_dir }}/symbol_le.gif) 10<sup>12</sup> ?\n\n"
@@ -4,15 +4,15 @@
4
4
  :url: http://projecteuler.net/problem=243
5
5
  :content: "A positive fraction whose numerator is less than its denominator is called
6
6
  a proper fraction. \n\rFor any denominator, <var>d</var>, there will be <var>d</var>
7
- ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1 proper
8
- fractions; for example, with <var>d</var> = 12: \n<sup>1</sup>/<sub>12</sub> ,
9
- <sup>2</sup>/<sub>12</sub> , <sup>3</sup>/<sub>12</sub> , <sup>4</sup>/<sub>12</sub>
10
- , <sup>5</sup>/<sub>12</sub> , <sup>6</sup>/<sub>12</sub> , <sup>7</sup>/<sub>12</sub>
11
- , <sup>8</sup>/<sub>12</sub> , <sup>9</sup>/<sub>12</sub> , <sup>10</sup>/<sub>12</sub>
12
- , <sup>11</sup>/<sub>12</sub> .\n\nWe shall call a fraction that cannot be cancelled
13
- down a _resilient fraction_. \n\rFurthermore we shall define the _resilience_ of
14
- a denominator, <var>R</var>(<var>d</var>), to be the ratio of its proper fractions
15
- that are resilient; for example, <var>R</var>(12) = <sup>4</sup>/<sub>11</sub> .
16
- \ \n\rIn fact, <var>d</var> = 12 is the smallest denominator having a resilience
17
- <var>R</var>(<var>d</var>) 4/<sub>10</sub> .\n\nFind the smallest denominator <var>d</var>,
18
- having a resilience <var>R</var>(<var>d</var>) 15499/<sub>94744</sub> .\n\n"
7
+ ![−]({{ images_dir }}/symbol_minus.gif)1 proper fractions; for example, with <var>d</var> = 12:
8
+ \ \n<sup>1</sup>/<sub>12</sub> , <sup>2</sup>/<sub>12</sub> , <sup>3</sup>/<sub>12</sub>
9
+ , <sup>4</sup>/<sub>12</sub> , <sup>5</sup>/<sub>12</sub> , <sup>6</sup>/<sub>12</sub>
10
+ , <sup>7</sup>/<sub>12</sub> , <sup>8</sup>/<sub>12</sub> , <sup>9</sup>/<sub>12</sub>
11
+ , <sup>10</sup>/<sub>12</sub> , <sup>11</sup>/<sub>12</sub> .\n\nWe shall call a
12
+ fraction that cannot be cancelled down a _resilient fraction_. \n\rFurthermore
13
+ we shall define the _resilience_ of a denominator, <var>R</var>(<var>d</var>), to
14
+ be the ratio of its proper fractions that are resilient; for example, <var>R</var>(12)
15
+ = <sup>4</sup>/<sub>11</sub> . \n\rIn fact, <var>d</var> = 12 is the smallest denominator
16
+ having a resilience <var>R</var>(<var>d</var>) 4/<sub>10</sub> .\n\nFind the smallest
17
+ denominator <var>d</var>, having a resilience <var>R</var>(<var>d</var>) 15499/<sub>94744</sub>
18
+ .\n\n"
@@ -6,18 +6,17 @@
6
6
  tiles, we have seven red tiles and eight blue tiles.\n\nA move is denoted by the
7
7
  uppercase initial of the direction (Left, Right, Up, Down) in which the tile is
8
8
  slid, e.g. starting from configuration ( **S** ), by the sequence **LULUR** we reach
9
- the configuration ( **E** ):\n\n| ( **S** ) | ![](/home/will/src/euler-manager/config/../data/images/p_244_start.gif)
10
- | , ( **E** ) | ![](/home/will/src/euler-manager/config/../data/images/p_244_example.gif)
11
- |\n\nFor each path, its checksum is calculated by (pseudocode):\n\n\rchecksum =
12
- 0 \n\rchecksum = (checksum ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
13
- 243 + <var>m</var><sub>1</sub>) mod 100 000 007 \n\rchecksum = (checksum ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
14
- 243 + <var>m</var><sub>2</sub>) mod 100 000 007 \n\r   … \n\rchecksum = (checksum
15
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 243 +
16
- <var>m</var><sub><var>n</var></sub>) mod 100 000 007 \n\n\rwhere <var>m</var><sub><var>k</var></sub>
9
+ the configuration ( **E** ):\n\n| ( **S** ) | ![]({{ images_dir }}/p_244_start.gif)
10
+ | , ( **E** ) | ![]({{ images_dir }}/p_244_example.gif) |\n\nFor each path, its
11
+ checksum is calculated by (pseudocode):\n\n\rchecksum = 0 \n\rchecksum = (checksum
12
+ ![×]({{ images_dir }}/symbol_times.gif) 243 + <var>m</var><sub>1</sub>) mod 100 000 007
13
+ \ \n\rchecksum = (checksum ![×]({{ images_dir }}/symbol_times.gif) 243 + <var>m</var><sub>2</sub>)
14
+ mod 100 000 007 \n\r   … \n\rchecksum = (checksum ![×]({{ images_dir }}/symbol_times.gif)
15
+ 243 + <var>m</var><sub><var>n</var></sub>) mod 100 000 007 \n\n\rwhere <var>m</var><sub><var>k</var></sub>
17
16
  is the ASCII value of the <var>k</var><sup><var>th</var></sup> letter in the move
18
17
  sequence and the ASCII values for the moves are:\r\r\n\n| **L** | 76 |\n| **R**
19
18
  | 82 |\n| **U** | 85 |\n| **D** | 68 |\n\nFor the sequence **LULUR** given above,
20
19
  the checksum would be 19761398.\n\nNow, starting from configuration ( **S** ),\rfind
21
- all shortest ways to reach configuration ( **T** ).\n\n| ( **S** ) | ![](/home/will/src/euler-manager/config/../data/images/p_244_start.gif)
22
- | , ( **T** ) | ![](/home/will/src/euler-manager/config/../data/images/p_244_target.gif)
23
- |\n\nWhat is the sum of all checksums for the paths having the minimal length?\n\n"
20
+ all shortest ways to reach configuration ( **T** ).\n\n| ( **S** ) | ![]({{ images_dir
21
+ }}/p_244_start.gif) | , ( **T** ) | ![]({{ images_dir }}/p_244_target.gif) |\n\nWhat
22
+ is the sum of all checksums for the paths having the minimal length?\n\n"
@@ -5,24 +5,23 @@
5
5
  :content: "We shall call a fraction that cannot be cancelled down a resilient fraction.
6
6
  \ \n Furthermore we shall define the resilience of a denominator, <var>R</var>(<var>d</var>),
7
7
  to be the ratio of its proper fractions that are resilient; for example, <var>R</var>(12)
8
- = <sup>4</sup>⁄<sub>11</sub>.\n\n| The resilience of a number <var>d</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
9
- 1 is then | \nφ(<var>d</var>) \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
10
- \ \n<var>d</var> - 1\n | , where φ is Euler's totient function. |\n\n| We further
11
- define the **coresilience** of a number <var>n</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
12
- 1 as <var>C</var>(<var>n</var>) | =  | \n<var>n</var> - φ(<var>n</var>) \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
13
- \ \n<var>n</var> - 1\n | . |\n\n| The coresilience of a prime <var>p</var> is <var>C</var>(<var>p</var>)
14
- | =  | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
15
- \ \n<var>p</var> - 1\n | . |\n\n<!--\r\n<p>The resilience of a number <var>d</var>
16
- <img src='images/symbol_gt.gif' width='10' height='10' alt='&gt;' border='0' style='vertical-align:middle;'
17
- /> 1 is then <font \"size=4\"><sup>&phi;(<var>d</var>)</sup>&frasl;<sub>(<var>d</var>-1)</sub></font>,
8
+ = <sup>4</sup>⁄<sub>11</sub>.\n\n| The resilience of a number <var>d</var> ![>]({{
9
+ images_dir }}/symbol_gt.gif) 1 is then | \nφ(<var>d</var>) \n ![]({{ images_dir
10
+ }}/blackdot.gif) \n<var>d</var> - 1\n | , where φ is Euler's totient function.
11
+ |\n\n| We further define the **coresilience** of a number <var>n</var> ![>]({{ images_dir
12
+ }}/symbol_gt.gif) 1 as <var>C</var>(<var>n</var>) | =  | \n<var>n</var> - φ(<var>n</var>)
13
+ \ \n ![]({{ images_dir }}/blackdot.gif) \n<var>n</var> - 1\n | . |\n\n| The coresilience
14
+ of a prime <var>p</var> is <var>C</var>(<var>p</var>) | =  | \n1 \n ![]({{ images_dir
15
+ }}/blackdot.gif) \n<var>p</var> - 1\n | . |\n\n<!--\r\n<p>The resilience of a number
16
+ <var>d</var> <img src='images/symbol_gt.gif' width='10' height='10' alt='&gt;' border='0'
17
+ style='vertical-align:middle;' /> 1 is then <font \"size=4\"><sup>&phi;(<var>d</var>)</sup>&frasl;<sub>(<var>d</var>-1)</sub></font>,
18
18
  where &phi; is Euler's totient function.</p>\r\n\r\n\r\n<p>We further define the
19
19
  <b>coresilience</b> of a number <var>n</var> <img src='images/symbol_gt.gif' width='10'
20
20
  height='10' alt='&gt;' border='0' style='vertical-align:middle;' /> 1 as <var>C</var>(<var>n</var>)
21
21
  = <font \"size=4\"><sup>(<var>n</var> - &phi;(<var>n</var>))</sup>&frasl;<sub>(<var>n</var>
22
22
  - 1)</sub></font>.\r\n</p>\r\n\r\n\r\n<p>The coresilience of a prime <var>p</var>
23
23
  is <var>C</var>(<var>p</var>) = <font \"size=4\"><sup>1</sup>&frasl;<sub>(<var>p</var>
24
- - 1)</sub></font>.</p>\r\n-->\n\nFind the sum of all **composite** integers 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
25
- <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
26
- 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)10<sup>11</sup>,
27
- for which <var>C</var>(<var>n</var>) is a <dfn title=\"A fraction with numerator
28
- 1\">unit fraction</dfn>.\n\n"
24
+ - 1)</sub></font>.</p>\r\n-->\n\nFind the sum of all **composite** integers 1 ![<]({{
25
+ images_dir }}/symbol_lt.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 2
26
+ ![×]({{ images_dir }}/symbol_times.gif)10<sup>11</sup>, for which <var>C</var>(<var>n</var>)
27
+ is a <dfn title=\"A fraction with numerator 1\">unit fraction</dfn>.\n\n"
@@ -3,12 +3,13 @@
3
3
  :name: Tangents to an ellipse
4
4
  :url: http://projecteuler.net/problem=246
5
5
  :content: "A definition for an ellipse is: \n\rGiven a circle c with centre M and
6
- radius r and a point G such that d(G,M) ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)r,
7
- the locus of the points that are equidistant from c and G form an ellipse.\n\n\rThe
8
- construction of the points of the ellipse is shown below.\r\r\n ![](/home/will/src/euler-manager/config/../data/images/p_246_anim.gif)\n\nGiven
9
- are the points M(-2000,1500) and G(8000,1500). \n \rGiven is also the circle c
10
- with centre M and radius 15000. \n\rThe locus of the points that are equidistant
11
- from G and c form an ellipse e. \n\rFrom a point P outside e the two tangents t<sub>1</sub>
12
- and t<sub>2</sub> to the ellipse are drawn. \n\rLet the points where t<sub>1</sub>
13
- and t<sub>2</sub> touch the ellipse be R and S.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_246_ellipse.gif)\n\nFor
14
- how many lattice points P is angle RPS greater than 45 degrees?\n\n"
6
+ radius r and a point G such that d(G,M) ![<]({{ images_dir }}/symbol_lt.gif)r, the
7
+ locus of the points that are equidistant from c and G form an ellipse.\n\n\rThe
8
+ construction of the points of the ellipse is shown below.\r\r\n ![]({{ images_dir
9
+ }}/p_246_anim.gif)\n\nGiven are the points M(-2000,1500) and G(8000,1500). \n \rGiven
10
+ is also the circle c with centre M and radius 15000. \n\rThe locus of the points
11
+ that are equidistant from G and c form an ellipse e. \n\rFrom a point P outside
12
+ e the two tangents t<sub>1</sub> and t<sub>2</sub> to the ellipse are drawn. \n\rLet
13
+ the points where t<sub>1</sub> and t<sub>2</sub> touch the ellipse be R and S.\n\n
14
+ ![]({{ images_dir }}/p_246_ellipse.gif)\n\nFor how many lattice points P is angle
15
+ RPS greater than 45 degrees?\n\n"
@@ -2,17 +2,16 @@
2
2
  :id: 247
3
3
  :name: Squares under a hyperbola
4
4
  :url: http://projecteuler.net/problem=247
5
- :content: "Consider the region constrained by 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- <var>x</var> and 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
7
- <var>y</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
- <sup>1</sup>/<sub><var>x</var></sub>.\n\nLet S<sub>1</sub> be the largest square
9
- that can fit under the curve. \n\rLet S<sub>2</sub> be the largest square that
10
- fits in the remaining area, and so on. \n\rLet the _index_ of S<sub><var>n</var></sub>
5
+ :content: "Consider the region constrained by 1 ![≤]({{ images_dir }}/symbol_le.gif)
6
+ <var>x</var> and 0 ![≤]({{ images_dir }}/symbol_le.gif) <var>y</var> ![≤]({{ images_dir
7
+ }}/symbol_le.gif) <sup>1</sup>/<sub><var>x</var></sub>.\n\nLet S<sub>1</sub> be
8
+ the largest square that can fit under the curve. \n\rLet S<sub>2</sub> be the largest
9
+ square that fits in the remaining area, and so on. \n\rLet the _index_ of S<sub><var>n</var></sub>
11
10
  be the pair (left, below) indicating the number of squares to the left of S<sub><var>n</var></sub>
12
- and the number of squares below S<sub><var>n</var></sub>.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_247_hypersquares.gif)\n\nThe
13
- diagram shows some such squares labelled by number. \n\rS<sub>2</sub> has one
14
- square to its left and none below, so the index of S<sub>2</sub> is (1,0). \n\rIt
15
- can be seen that the index of S<sub>32</sub> is (1,1) as is the index of S<sub>50</sub>.
16
- \ \n\r50 is the largest <var>n</var> for which the index of S<sub><var>n</var></sub>
17
- is (1,1).\n\nWhat is the largest <var>n</var> for which the index of S<sub><var>n</var></sub>
18
- is (3,3)?\n\n"
11
+ and the number of squares below S<sub><var>n</var></sub>.\n\n ![]({{ images_dir
12
+ }}/p_247_hypersquares.gif)\n\nThe diagram shows some such squares labelled by number.
13
+ \ \n\rS<sub>2</sub> has one square to its left and none below, so the index of
14
+ S<sub>2</sub> is (1,0). \n\rIt can be seen that the index of S<sub>32</sub> is
15
+ (1,1) as is the index of S<sub>50</sub>. \n\r50 is the largest <var>n</var> for
16
+ which the index of S<sub><var>n</var></sub> is (1,1).\n\nWhat is the largest <var>n</var>
17
+ for which the index of S<sub><var>n</var></sub> is (3,3)?\n\n"
@@ -5,11 +5,11 @@
5
5
  :content: |+
6
6
  A triplet of positive integers (<var>a</var>,<var>b</var>,<var>c</var>) is called a Cardano Triplet if it satisfies the condition:
7
7
 
8
- ![](/home/will/src/euler-manager/config/../data/images/p_251_cardano.gif)
8
+ ![]({{ images_dir }}/p_251_cardano.gif)
9
9
 
10
10
  For example, (2,1,5) is a Cardano Triplet.
11
11
 
12
- There exist 149 Cardano Triplets for which <var>a</var>+<var>b</var>+<var>c</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1000.
12
+ There exist 149 Cardano Triplets for which <var>a</var>+<var>b</var>+<var>c</var> ![≤]({{ images_dir }}/symbol_le.gif) 1000.
13
13
 
14
- Find how many Cardano Triplets exist such that <var>a</var>+<var>b</var>+<var>c</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 110,000,000.
14
+ Find how many Cardano Triplets exist such that <var>a</var>+<var>b</var>+<var>c</var> ![≤]({{ images_dir }}/symbol_le.gif) 110,000,000.
15
15
 
@@ -8,7 +8,7 @@
8
8
  lie on the perimeter of the polygon).\n\nAs an example, the image below shows a
9
9
  set of twenty points and a few such convex holes. \rThe convex hole shown as a red
10
10
  heptagon has an area equal to 1049694.5 square units, which is the highest possible
11
- area for a convex hole on the given set of points.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_252_convexhole.gif)\n\n<style
11
+ area for a convex hole on the given set of points.\n\n ![]({{ images_dir }}/p_252_convexhole.gif)\n\n<style
12
12
  type=\"text/css\"><![CDATA[\r\ntable.p252 td {\r\n padding: 0px 3px 0px 3px;\r\n
13
13
  \ vertical-align: bottom;\r\n text-align: left;\r\n}\r\n]]></style>\n\nFor our
14
14
  example, we used the first 20 points (<var>T</var><sub>2<var>k</var><img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
@@ -22,9 +22,8 @@
22
22
  \ <td>=<sub> </sub>\n</td>\r\n <td>( <var>S</var><sub><var>n</var></sub> mod
23
23
  2000 ) <img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\" height=\"3\"
24
24
  alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"> 1000<sup> </sup>\n</td>\r\n
25
- \ </tr>\r\n</table></center>\n\n_i.e._ (527, 144), ( ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)488, 732),
26
- ( ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)454,
27
- ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)947), …\n\nWhat
28
- is the maximum area for a convex hole on the set containing the first 500 points
29
- in the pseudo-random sequence? \n Specify your answer including one digit after
30
- the decimal point.\n\n"
25
+ \ </tr>\r\n</table></center>\n\n_i.e._ (527, 144), ( ![−]({{ images_dir }}/symbol_minus.gif)488, 732),
26
+ ( ![−]({{ images_dir }}/symbol_minus.gif)454,  ![−]({{ images_dir }}/symbol_minus.gif)947),
27
+ …\n\nWhat is the maximum area for a convex hole on the set containing the first
28
+ 500 points in the pseudo-random sequence? \n Specify your answer including one
29
+ digit after the decimal point.\n\n"
@@ -11,7 +11,7 @@
11
11
 
12
12
  Define sg(<var>i</var>) as the sum of the digits of g(<var>i</var>). So sg(5) = 2 + 5 = 7.
13
13
 
14
- Further, it can be verified that g(20) is 267 and ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) sg(<var>i</var>) for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>i</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 20 is 156.
14
+ Further, it can be verified that g(20) is 267 and ![∑]({{ images_dir }}/symbol_sum.gif) sg(<var>i</var>) for 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>i</var> ![≤]({{ images_dir }}/symbol_le.gif) 20 is 156.
15
15
 
16
- What is ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) sg(<var>i</var>) for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>i</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 150?
16
+ What is ![∑]({{ images_dir }}/symbol_sum.gif) sg(<var>i</var>) for 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>i</var> ![≤]({{ images_dir }}/symbol_le.gif) 150?
17
17