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
@@ -6,44 +6,43 @@
6
6
  as the square root of <var>n</var> rounded to the nearest integer.\n\nThe following
7
7
  procedure (essentially Heron's method adapted to integer arithmetic) finds the rounded-square-root
8
8
  of <var>n</var>:\n\nLet <var>d</var> be the number of digits of the number <var>n</var>.
9
- \ \n\rIf <var>d</var> is odd, set <var>x</var><sub>0</sub> = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)10<sup>(<var>d</var>-1)⁄2</sup>.
10
- \ \n\rIf <var>d</var> is even, set <var>x</var><sub>0</sub> = 7 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)10<sup>(<var>d</var>-2)⁄2</sup>.
11
- \ \n\rRepeat:\n\n![](/home/will/src/euler-manager/config/../data/images/p_255_Heron.gif)\n\n<!--\r\n<table
12
- align='center'>\r\n<tr><td><var>x</var><sub><var>k</var>+1</sub> =</td>\r\n<td style='font-size:220%'>&#8970;</td>\r\n<td
13
- style='text-align:center;'><var>x</var><sub><var>k</var></sub> + <img src='images/symbol_lceil.gif'
14
- width='6' height='16' alt='&lceil;' border='0' style='vertical-align:middle;' /><var>n</var>&frasl;<var>x</var><sub><var>k</var></sub><img
9
+ \ \n\rIf <var>d</var> is odd, set <var>x</var><sub>0</sub> = 2 ![×]({{ images_dir
10
+ }}/symbol_times.gif)10<sup>(<var>d</var>-1)⁄2</sup>. \n\rIf <var>d</var> is even,
11
+ set <var>x</var><sub>0</sub> = 7 ![×]({{ images_dir }}/symbol_times.gif)10<sup>(<var>d</var>-2)⁄2</sup>.
12
+ \ \n\rRepeat:\n\n![]({{ images_dir }}/p_255_Heron.gif)\n\n<!--\r\n<table align='center'>\r\n<tr><td><var>x</var><sub><var>k</var>+1</sub>
13
+ =</td>\r\n<td style='font-size:220%'>&#8970;</td>\r\n<td style='text-align:center;'><var>x</var><sub><var>k</var></sub>
14
+ + <img src='images/symbol_lceil.gif' width='6' height='16' alt='&lceil;' border='0'
15
+ style='vertical-align:middle;' /><var>n</var>&frasl;<var>x</var><sub><var>k</var></sub><img
15
16
  src='images/symbol_rceil.gif' width='6' height='16' alt='&rceil;' border='0' style='vertical-align:middle;'
16
17
  /><br />\r\n<img src='images/blackdot.gif' width='75' height='1' alt='' /><br />\r\n2</td><td><td
17
18
  style='font-size:220%'>&#8971;</td></tr>\r\n</table> -->\n\nuntil <var>x</var><sub><var>k</var>+1</sub>
18
19
  = <var>x</var><sub><var>k</var></sub>.\n\nAs an example, let us find the rounded-square-root
19
20
  of <var>n</var> = 4321. \n<var>n</var> has 4 digits, so <var>x</var><sub>0</sub>
20
- = 7 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)10<sup>(4-2)⁄2</sup>
21
- = 70. \n ![](/home/will/src/euler-manager/config/../data/images/p_255_Example.gif)<!--<var>x</var><sub>1</sub>
22
- = <img src='images/symbol_lfloor.gif' width='6' height='16' alt='&lfloor;' border='0'
23
- style='vertical-align:middle;' />(70 + <img src='images/symbol_lceil.gif' width='6'
24
- height='16' alt='&lceil;' border='0' style='vertical-align:middle;' />4321&frasl;70<img
25
- src='images/symbol_rceil.gif' width='6' height='16' alt='&rceil;' border='0' style='vertical-align:middle;'
26
- />)&frasl;2<img src='images/symbol_rfloor.gif' width='6' height='16' alt='&rfloor;'
27
- border='0' style='vertical-align:middle;' /> = 66.<br />\r\n<var>x</var><sub>2</sub>
28
- = <img src='images/symbol_lfloor.gif' width='6' height='16' alt='&lfloor;' border='0'
29
- style='vertical-align:middle;' />(66 + <img src='images/symbol_lceil.gif' width='6'
30
- height='16' alt='&lceil;' border='0' style='vertical-align:middle;' />4321&frasl;66<img
31
- src='images/symbol_rceil.gif' width='6' height='16' alt='&rceil;' border='0' style='vertical-align:middle;'
32
- />)&frasl;2<img src='images/symbol_rfloor.gif' width='6' height='16' alt='&rfloor;'
33
- border='0' style='vertical-align:middle;' /> = 66.--> \n\rSince <var>x</var><sub>2</sub>
34
- = <var>x</var><sub>1</sub>, we stop here. \n\rSo, after just two iterations, we
35
- have found that the rounded-square-root of 4321 is 66 (the actual square root is
36
- 65.7343137…).\n\nThe number of iterations required when using this method is surprisingly
37
- low. \n\rFor example, we can find the rounded-square-root of a 5-digit integer
38
- (10,000 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
39
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 99,999) with
40
- an average of 3.2102888889 iterations (the average value was rounded to 10 decimal
41
- places).\n\nUsing the procedure described above, what is the average number of iterations
42
- required to find the rounded-square-root of a 14-digit number (10<sup>13</sup> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
43
- <var>n</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
44
- 10<sup>14</sup>)? \n\rGive your answer rounded to 10 decimal places.\n\nNote: The
45
- symbols ![](/home/will/src/euler-manager/config/../data/images/symbol_lfloor.gif)<var>x</var>
46
- ![⌋](/home/will/src/euler-manager/config/../data/images/symbol_rfloor.gif) and ![⌈](/home/will/src/euler-manager/config/../data/images/symbol_lceil.gif)<var>x</var>
47
- ![⌉](/home/will/src/euler-manager/config/../data/images/symbol_rceil.gif) represent
48
- the <dfn title=\"the largest integer not greater than x\">floor function</dfn> and
49
- <dfn title=\"the smallest integer not less than x\">ceiling function</dfn> respectively.\n\n"
21
+ = 7 ![×]({{ images_dir }}/symbol_times.gif)10<sup>(4-2)⁄2</sup> = 70. \n ![]({{
22
+ images_dir }}/p_255_Example.gif)<!--<var>x</var><sub>1</sub> = <img src='images/symbol_lfloor.gif'
23
+ width='6' height='16' alt='&lfloor;' border='0' style='vertical-align:middle;' />(70
24
+ + <img src='images/symbol_lceil.gif' width='6' height='16' alt='&lceil;' border='0'
25
+ style='vertical-align:middle;' />4321&frasl;70<img src='images/symbol_rceil.gif'
26
+ width='6' height='16' alt='&rceil;' border='0' style='vertical-align:middle;' />)&frasl;2<img
27
+ src='images/symbol_rfloor.gif' width='6' height='16' alt='&rfloor;' border='0' style='vertical-align:middle;'
28
+ /> = 66.<br />\r\n<var>x</var><sub>2</sub> = <img src='images/symbol_lfloor.gif'
29
+ width='6' height='16' alt='&lfloor;' border='0' style='vertical-align:middle;' />(66
30
+ + <img src='images/symbol_lceil.gif' width='6' height='16' alt='&lceil;' border='0'
31
+ style='vertical-align:middle;' />4321&frasl;66<img src='images/symbol_rceil.gif'
32
+ width='6' height='16' alt='&rceil;' border='0' style='vertical-align:middle;' />)&frasl;2<img
33
+ src='images/symbol_rfloor.gif' width='6' height='16' alt='&rfloor;' border='0' style='vertical-align:middle;'
34
+ /> = 66.--> \n\rSince <var>x</var><sub>2</sub> = <var>x</var><sub>1</sub>, we stop
35
+ here. \n\rSo, after just two iterations, we have found that the rounded-square-root
36
+ of 4321 is 66 (the actual square root is 65.7343137…).\n\nThe number of iterations
37
+ required when using this method is surprisingly low. \n\rFor example, we can find
38
+ the rounded-square-root of a 5-digit integer (10,000 ![≤]({{ images_dir }}/symbol_le.gif)
39
+ <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 99,999) with an average of 3.2102888889
40
+ iterations (the average value was rounded to 10 decimal places).\n\nUsing the procedure
41
+ described above, what is the average number of iterations required to find the rounded-square-root
42
+ of a 14-digit number (10<sup>13</sup> ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var>
43
+ ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>14</sup>)? \n\rGive your answer rounded
44
+ to 10 decimal places.\n\nNote: The symbols ![]({{ images_dir }}/symbol_lfloor.gif)<var>x</var>
45
+ ![⌋]({{ images_dir }}/symbol_rfloor.gif) and ![⌈]({{ images_dir }}/symbol_lceil.gif)<var>x</var>
46
+ ![]({{ images_dir }}/symbol_rceil.gif) represent the <dfn title=\"the largest integer
47
+ not greater than x\">floor function</dfn> and <dfn title=\"the smallest integer
48
+ not less than x\">ceiling function</dfn> respectively.\n\n"
@@ -4,32 +4,28 @@
4
4
  :url: http://projecteuler.net/problem=256
5
5
  :content: "Tatami are rectangular mats, used to completely cover the floor of a room,
6
6
  without overlap.\n\nAssuming that the only type of available tatami has dimensions
7
- 1 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2, there
8
- are obviously some limitations for the shape and size of the rooms that can be covered.\n\nFor
9
- this problem, we consider only rectangular rooms with integer dimensions <var>a</var>,
10
- <var>b</var> and even size <var>s</var> = <var>a</var>·<var>b</var>. \n\rWe use
11
- the term 'size' to denote the floor surface area of the room, and — without loss
12
- of generality — we add the condition <var>a</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
13
- <var>b</var>.\n\nThere is one rule to follow when laying out tatami: there must
14
- be no points where corners of four different mats meet. \n\rFor example, consider
15
- the two arrangements below for a 4 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)4
16
- room:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_256_tatami3.gif)
7
+ 1 ![×]({{ images_dir }}/symbol_times.gif)2, there are obviously some limitations
8
+ for the shape and size of the rooms that can be covered.\n\nFor this problem, we
9
+ consider only rectangular rooms with integer dimensions <var>a</var>, <var>b</var>
10
+ and even size <var>s</var> = <var>a</var>·<var>b</var>. \n\rWe use the term 'size'
11
+ to denote the floor surface area of the room, and — without loss of generality —
12
+ we add the condition <var>a</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>b</var>.\n\nThere
13
+ is one rule to follow when laying out tatami: there must be no points where corners
14
+ of four different mats meet. \n\rFor example, consider the two arrangements below
15
+ for a 4 ![×]({{ images_dir }}/symbol_times.gif)4 room:\n\n ![]({{ images_dir }}/p_256_tatami3.gif)
17
16
  \ \n\nThe arrangement on the left is acceptable, whereas the one on the right is
18
17
  not: a red \" **X** \" in the middle, marks the point where four tatami meet.\n\nBecause
19
18
  of this rule, certain even-sized rooms cannot be covered with tatami: we call them
20
19
  tatami-free rooms. \n\rFurther, we define <var>T</var>(<var>s</var>) as the number
21
20
  of tatami-free rooms of size <var>s</var>.\n\nThe smallest tatami-free room has
22
- size <var>s</var> = 70 and dimensions 7 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)10.
21
+ size <var>s</var> = 70 and dimensions 7 ![×]({{ images_dir }}/symbol_times.gif)10.
23
22
  \ \n\rAll the other rooms of size <var>s</var> = 70 can be covered with tatami;
24
- they are: 1 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)70,
25
- 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)35 and
26
- 5 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)14. \n\rHence,
27
- <var>T</var>(70) = 1.\n\nSimilarly, we can verify that <var>T</var>(1320) = 5 because
28
- there are exactly 5 tatami-free rooms of size <var>s</var> = 1320: \n\r20 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)66,
29
- 22 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)60,
30
- 24 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)55,
31
- 30 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)44 and
32
- 33 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)40.
23
+ they are: 1 ![×]({{ images_dir }}/symbol_times.gif)70, 2 ![×]({{ images_dir }}/symbol_times.gif)35
24
+ and 5 ![×]({{ images_dir }}/symbol_times.gif)14. \n\rHence, <var>T</var>(70) =
25
+ 1.\n\nSimilarly, we can verify that <var>T</var>(1320) = 5 because there are exactly
26
+ 5 tatami-free rooms of size <var>s</var> = 1320: \n\r20 ![×]({{ images_dir }}/symbol_times.gif)66,
27
+ 22 ![×]({{ images_dir }}/symbol_times.gif)60, 24 ![×]({{ images_dir }}/symbol_times.gif)55,
28
+ 30 ![×]({{ images_dir }}/symbol_times.gif)44 and 33 ![×]({{ images_dir }}/symbol_times.gif)40.
33
29
  \ \n\rIn fact, <var>s</var> = 1320 is the smallest room-size <var>s</var> for which
34
30
  <var>T</var>(<var>s</var>) = 5.\n\nFind the smallest room-size <var>s</var> for
35
31
  which <var>T</var>(<var>s</var>) = 200.\n\n"
@@ -2,13 +2,13 @@
2
2
  :id: 257
3
3
  :name: Angular Bisectors
4
4
  :url: http://projecteuler.net/problem=257
5
- :content: "Given is an integer sided triangle ABC with sides a ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- b ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) c. \r(AB
7
- = c, BC = a and AC = b). \n\rThe angular bisectors of the triangle intersect the
8
- sides at points E, F and G (see picture below).\n\n ![](/home/will/src/euler-manager/config/../data/images/p_257_bisector.gif)
9
- \ \n\nThe segments EF, EG and FG partition the triangle ABC into four smaller triangles:
10
- AEG, BFE, CGF and EFG. \n\rIt can be proven that for each of these four triangles
11
- the ratio area(ABC)/area(subtriangle) is rational. \n\rHowever, there exist triangles
5
+ :content: "Given is an integer sided triangle ABC with sides a ![≤]({{ images_dir
6
+ }}/symbol_le.gif) b ![≤]({{ images_dir }}/symbol_le.gif) c. \r(AB = c, BC = a and
7
+ AC = b). \n\rThe angular bisectors of the triangle intersect the sides at points
8
+ E, F and G (see picture below).\n\n ![]({{ images_dir }}/p_257_bisector.gif) \n\nThe
9
+ segments EF, EG and FG partition the triangle ABC into four smaller triangles: AEG,
10
+ BFE, CGF and EFG. \n\rIt can be proven that for each of these four triangles the
11
+ ratio area(ABC)/area(subtriangle) is rational. \n\rHowever, there exist triangles
12
12
  for which some or all of these ratios are integral.\n\nHow many triangles ABC with
13
- perimeter ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)100,000,000
14
- exist so that the ratio area(ABC)/area(AEG) is integral?\n\n"
13
+ perimeter ![≤]({{ images_dir }}/symbol_le.gif)100,000,000 exist so that the ratio
14
+ area(ABC)/area(AEG) is integral?\n\n"
@@ -3,9 +3,8 @@
3
3
  :name: A lagged Fibonacci sequence
4
4
  :url: http://projecteuler.net/problem=258
5
5
  :content: "A sequence is defined as:\n\n- <var>g</var><sub><var>k</var></sub> = 1,
6
- for 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>k</var>
7
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1999\n- <var>g</var><sub><var>k</var></sub>
8
- = <var>g</var><sub><var>k</var>-2000</sub> + <var>g</var><sub><var>k</var>-1999</sub>,
9
- for <var>k</var> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
10
- 2000.\r\n\nFind <var>g</var><sub><var>k</var></sub> mod 20092010 for <var>k</var>
11
- = 10<sup>18</sup>.\n\n"
6
+ for 0 ![≤]({{ images_dir }}/symbol_le.gif) <var>k</var> ![≤]({{ images_dir }}/symbol_le.gif)
7
+ 1999\n- <var>g</var><sub><var>k</var></sub> = <var>g</var><sub><var>k</var>-2000</sub>
8
+ + <var>g</var><sub><var>k</var>-1999</sub>, for <var>k</var> ![≥]({{ images_dir
9
+ }}/symbol_ge.gif) 2000.\r\n\nFind <var>g</var><sub><var>k</var></sub> mod 20092010
10
+ for <var>k</var> = 10<sup>18</sup>.\n\n"
data/data/problems/26.yml CHANGED
@@ -17,5 +17,5 @@
17
17
 
18
18
  Where 0.1(6) means 0.166666..., and has a 1-digit recurring cycle. It can be seen that <sup>1</sup>/<sub>7</sub> has a 6-digit recurring cycle.
19
19
 
20
- Find the value of _d_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 1000 for which <sup>1</sup>/<sub><i>d</i></sub> contains the longest recurring cycle in its decimal fraction part.
20
+ Find the value of _d_ ![<]({{ images_dir }}/symbol_lt.gif) 1000 for which <sup>1</sup>/<sub><i>d</i></sub> contains the longest recurring cycle in its decimal fraction part.
21
21
 
@@ -15,12 +15,10 @@
15
15
  what the first player does. \n \rFor example, (0,1,2) and (1,3,3) are losing configurations:
16
16
  any legal move leaves a winning configuration for the second player.\n\nConsider
17
17
  all losing configurations (x<sub>i</sub>,y<sub>i</sub>,z<sub>i</sub>) where x<sub>i</sub>
18
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) y<sub>i</sub>
19
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) z<sub>i</sub>
20
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 100. \n\rWe
21
- can verify that Σ(x<sub>i</sub>+y<sub>i</sub>+z<sub>i</sub>) = 173895 for these.\n\nFind
22
- Σ(x<sub>i</sub>+y<sub>i</sub>+z<sub>i</sub>) where (x<sub>i</sub>,y<sub>i</sub>,z<sub>i</sub>)
23
- ranges over the losing configurations \n\rwith x<sub>i</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
24
- y<sub>i</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
25
- z<sub>i</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
18
+ ![≤]({{ images_dir }}/symbol_le.gif) y<sub>i</sub> ![≤]({{ images_dir }}/symbol_le.gif)
19
+ z<sub>i</sub> ![≤]({{ images_dir }}/symbol_le.gif) 100. \n\rWe can verify that
20
+ Σ(x<sub>i</sub>+y<sub>i</sub>+z<sub>i</sub>) = 173895 for these.\n\nFind Σ(x<sub>i</sub>+y<sub>i</sub>+z<sub>i</sub>)
21
+ where (x<sub>i</sub>,y<sub>i</sub>,z<sub>i</sub>) ranges over the losing configurations
22
+ \ \n\rwith x<sub>i</sub> ![≤]({{ images_dir }}/symbol_le.gif) y<sub>i</sub> ![≤]({{
23
+ images_dir }}/symbol_le.gif) z<sub>i</sub> ![≤]({{ images_dir }}/symbol_le.gif)
26
24
  1000.\n\n"
@@ -3,15 +3,14 @@
3
3
  :name: Pivotal Square Sums
4
4
  :url: http://projecteuler.net/problem=261
5
5
  :content: "Let us call a positive integer <var>k</var> a <var>square-pivot</var>,
6
- if there is a pair of integers <var>m</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
7
- 0 and <var>n</var> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
8
- <var>k</var>, such that the sum of the (<var>m</var>+1) consecutive squares up to
9
- <var>k</var> equals the sum of the <var>m</var> consecutive squares from (<var>n</var>+1)
10
- on:\n\n\r(<var>k</var>-<var>m</var>)<sup>2</sup> + ... + <var>k</var><sup>2</sup>
11
- = (<var>n</var>+1)<sup>2</sup> + ... + (<var>n</var>+<var>m</var>)<sup>2</sup>.\n\nSome
6
+ if there is a pair of integers <var>m</var> ![>]({{ images_dir }}/symbol_gt.gif)
7
+ 0 and <var>n</var> ![≥]({{ images_dir }}/symbol_ge.gif) <var>k</var>, such that
8
+ the sum of the (<var>m</var>+1) consecutive squares up to <var>k</var> equals the
9
+ sum of the <var>m</var> consecutive squares from (<var>n</var>+1) on:\n\n\r(<var>k</var>-<var>m</var>)<sup>2</sup>
10
+ + ... + <var>k</var><sup>2</sup> = (<var>n</var>+1)<sup>2</sup> + ... + (<var>n</var>+<var>m</var>)<sup>2</sup>.\n\nSome
12
11
  small square-pivots are\n\n- **4** : 3<sup>2</sup> + **4** <sup>2</sup>\r = 5<sup>2</sup>\n-
13
12
  **21** : 20<sup>2</sup> + **21** <sup>2</sup> = 29<sup>2</sup>\n- **24** : 21<sup>2</sup>
14
13
  + 22<sup>2</sup> + 23<sup>2</sup> + **24** <sup>2</sup> = 25<sup>2</sup> + 26<sup>2</sup>
15
14
  + 27<sup>2</sup>\n- **110** : 108<sup>2</sup> + 109<sup>2</sup> + **110** <sup>2</sup>
16
15
  = 133<sup>2</sup> + 134<sup>2</sup>\n\nFind the sum of all **distinct** square-pivots
17
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>10</sup>.\n\n"
16
+ ![≤]({{ images_dir }}/symbol_le.gif) 10<sup>10</sup>.\n\n"
@@ -4,7 +4,7 @@
4
4
  :url: http://projecteuler.net/problem=262
5
5
  :content: "The following equation represents the _continuous_ topography of a mountainous
6
6
  region, giving the <dfn title=\"height above sea level\">elevation</dfn> <var>h</var>
7
- at any point (<var>x</var>,<var>y</var>):\n\n ![](/home/will/src/euler-manager/config/../data/images/p_262_formula1.gif)
7
+ at any point (<var>x</var>,<var>y</var>):\n\n ![]({{ images_dir }}/p_262_formula1.gif)
8
8
  \ \n\nA mosquito intends to fly from A(200,200) to B(1400,1400), without leaving
9
9
  the area given by 0 ≤ <var>x</var>, <var>y</var> ≤ 1600.\n\nBecause of the intervening
10
10
  mountains, it first rises straight up to a point A', having elevation <var>f</var>.
@@ -6,14 +6,13 @@
6
6
  coordinates\">lattice points</dfn>.\n- <dfn title=\"Centre of the circumscribed
7
7
  circle\">Circumcentre</dfn> at the origin O.\n- <dfn title=\"Point where the three
8
8
  altitudes meet\">Orthocentre</dfn> at the point H(5, 0).\n\nThere are nine such
9
- triangles having a perimeter ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
10
- 50. \n\rListed and shown in ascending order of their perimeter, they are:\n\n|
11
- A(-4, 3), B(5, 0), C(4, -3) \n\rA(4, 3), B(5, 0), C(-4, -3) \n\rA(-3, 4), B(5,
12
- 0), C(3, -4) \n \n \n \n \n\rA(3, 4), B(5, 0), C(-3, -4) \n\rA(0, 5), B(5,
13
- 0), C(0, -5) \n\rA(1, 8), B(8, -1), C(-4, -7) \n \n \n \n \n\rA(8, 1), B(1,
14
- -8), C(-4, 7) \n\rA(2, 9), B(9, -2), C(-6, -7) \n\rA(9, 2), B(2, -9), C(-6, 7)
15
- \ \n | ![](/home/will/src/euler-manager/config/../data/images/p_264_TriangleCentres.gif)
16
- |\n\nThe sum of their perimeters, rounded to four decimal places, is 291.0089.\n\nFind
17
- all such triangles with a perimeter ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
18
- 10<sup>5</sup>. \n\rEnter as your answer the sum of their perimeters rounded to
19
- four decimal places.\n\n"
9
+ triangles having a perimeter ![≤]({{ images_dir }}/symbol_le.gif) 50. \n\rListed
10
+ and shown in ascending order of their perimeter, they are:\n\n| A(-4, 3), B(5, 0),
11
+ C(4, -3) \n\rA(4, 3), B(5, 0), C(-4, -3) \n\rA(-3, 4), B(5, 0), C(3, -4) \n \n
12
+ \ \n \n \n\rA(3, 4), B(5, 0), C(-3, -4) \n\rA(0, 5), B(5, 0), C(0, -5) \n\rA(1,
13
+ 8), B(8, -1), C(-4, -7) \n \n \n \n \n\rA(8, 1), B(1, -8), C(-4, 7) \n\rA(2,
14
+ 9), B(9, -2), C(-6, -7) \n\rA(9, 2), B(2, -9), C(-6, 7) \n | ![]({{ images_dir
15
+ }}/p_264_TriangleCentres.gif) |\n\nThe sum of their perimeters, rounded to four
16
+ decimal places, is 291.0089.\n\nFind all such triangles with a perimeter ![≤]({{
17
+ images_dir }}/symbol_le.gif) 10<sup>5</sup>. \n\rEnter as your answer the sum of
18
+ their perimeters rounded to four decimal places.\n\n"
@@ -4,7 +4,7 @@
4
4
  :url: http://projecteuler.net/problem=265
5
5
  :content: "2<sup>N</sup> binary digits can be placed in a circle so that all the N-digit
6
6
  clockwise subsequences are distinct.\n\nFor N=3, two such circular arrangements
7
- are possible, ignoring rotations:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_265_BinaryCircles.gif)\n\nFor
7
+ are possible, ignoring rotations:\n\n ![]({{ images_dir }}/p_265_BinaryCircles.gif)\n\nFor
8
8
  the first arrangement, the 3-digit subsequences, in clockwise order, are: \n 000,
9
9
  001, 010, 101, 011, 111, 110 and 100.\n\nEach circular arrangement can be encoded
10
10
  as a number by concatenating the binary digits starting with the subsequence of
data/data/problems/27.yml CHANGED
@@ -6,14 +6,13 @@
6
6
  turns out that the formula will produce 40 primes for the consecutive values _n_
7
7
  = 0 to 39. However, when _n_ = 40, 40<sup>2</sup> + 40 + 41 = 40(40 + 1) + 41 is
8
8
  divisible by 41, and certainly when _n_ = 41, 41² + 41 + 41 is clearly divisible
9
- by 41.\n\nThe incredible formula  _n_² ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
10
- 79_n_ + 1601 was discovered, which produces 80 primes for the consecutive values
11
- _n_ = 0 to 79. The product of the coefficients, ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)79
12
- and 1601, is ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)126479.\n\nConsidering
13
- quadratics of the form:\n\n> _n_² + _an_ + _b_, where |_a_| ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
14
- 1000 and |_b_| ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
15
- 1000 \n> \n> \n> where |_n_| is the modulus/absolute value of _n_ \n> e.g. |11|
16
- = 11 and | ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)4|
17
- = 4\n\nFind the product of the coefficients, _a_ and _b_, for the quadratic expression
18
- that produces the maximum number of primes for consecutive values of _n_, starting
19
- with _n_ = 0.\n\n"
9
+ by 41.\n\nThe incredible formula  _n_² ![−]({{ images_dir }}/symbol_minus.gif) 79_n_
10
+ + 1601 was discovered, which produces 80 primes for the consecutive values _n_ =
11
+ 0 to 79. The product of the coefficients, ![−]({{ images_dir }}/symbol_minus.gif)79
12
+ and 1601, is ![−]({{ images_dir }}/symbol_minus.gif)126479.\n\nConsidering quadratics
13
+ of the form:\n\n> _n_² + _an_ + _b_, where |_a_| ![<]({{ images_dir }}/symbol_lt.gif)
14
+ 1000 and |_b_| ![<]({{ images_dir }}/symbol_lt.gif) 1000 \n> \n> \n> where |_n_|
15
+ is the modulus/absolute value of _n_ \n> e.g. |11| = 11 and | ![−]({{ images_dir
16
+ }}/symbol_minus.gif)4| = 4\n\nFind the product of the coefficients, _a_ and _b_,
17
+ for the quadratic expression that produces the maximum number of primes for consecutive
18
+ values of _n_, starting with _n_ = 0.\n\n"
@@ -3,15 +3,15 @@
3
3
  :name: Cutting Squares
4
4
  :url: http://projecteuler.net/problem=270
5
5
  :content: |+
6
- A square piece of paper with integer dimensions N ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)N is placed with a corner at the origin and two of its sides along the <var>x</var>- and <var>y</var>-axes. Then, we cut it up respecting the following rules:
6
+ A square piece of paper with integer dimensions N ![×]({{ images_dir }}/symbol_times.gif)N is placed with a corner at the origin and two of its sides along the <var>x</var>- and <var>y</var>-axes. Then, we cut it up respecting the following rules:
7
7
 
8
8
  - We only make straight cuts between two points lying on different sides of the square, and having integer coordinates.
9
9
  - Two cuts cannot cross, but several cuts can meet at the same border point.
10
10
  - Proceed until no more legal cuts can be made.
11
11
 
12
- Counting any reflections or rotations as distinct, we call C(N) the number of ways to cut an N ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)N square. For example, C(1) = 2 and C(2) = 30 (shown below).
12
+ Counting any reflections or rotations as distinct, we call C(N) the number of ways to cut an N ![×]({{ images_dir }}/symbol_times.gif)N square. For example, C(1) = 2 and C(2) = 30 (shown below).
13
13
 
14
- ![](/home/will/src/euler-manager/config/../data/images/p_270_CutSquare.gif)
14
+ ![]({{ images_dir }}/p_270_CutSquare.gif)
15
15
 
16
16
  What is C(30) mod 10<sup>8</sup> ?
17
17
 
@@ -3,9 +3,8 @@
3
3
  :name: Modular Cubes, part 1
4
4
  :url: http://projecteuler.net/problem=271
5
5
  :content: "For a positive number <var>n</var>, define S(<var>n</var>) as the sum of
6
- the integers <var>x,</var> for which 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>x</var>
7
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>n</var>
8
- and \n <var>x</var><sup>3</sup> ![≡](/home/will/src/euler-manager/config/../data/images/symbol_cong.gif)1
9
- mod <var>n</var>.\n\nWhen <var>n</var>=91, there are 8 possible values for <var>x</var>,
10
- namely : 9, 16, 22, 29, 53, 74, 79, 81. \n\rThus, S(91)=9+16+22+29+53+74+79+81=363.\n\nFind
11
- S(13082761331670030).\n\n"
6
+ the integers <var>x,</var> for which 1 ![<]({{ images_dir }}/symbol_lt.gif)<var>x</var>
7
+ ![<]({{ images_dir }}/symbol_lt.gif)<var>n</var> and \n <var>x</var><sup>3</sup>
8
+ ![≡]({{ images_dir }}/symbol_cong.gif)1 mod <var>n</var>.\n\nWhen <var>n</var>=91,
9
+ there are 8 possible values for <var>x</var>, namely : 9, 16, 22, 29, 53, 74, 79,
10
+ 81. \n\rThus, S(91)=9+16+22+29+53+74+79+81=363.\n\nFind S(13082761331670030).\n\n"
@@ -3,10 +3,9 @@
3
3
  :name: Modular Cubes, part 2
4
4
  :url: http://projecteuler.net/problem=272
5
5
  :content: "For a positive number <var>n</var>, define C(<var>n</var>) as the number
6
- of the integers <var>x,</var> for which 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>x</var>
7
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>n</var>
8
- and \n <var>x</var><sup>3</sup> ![≡](/home/will/src/euler-manager/config/../data/images/symbol_cong.gif)1
9
- mod <var>n</var>.\n\nWhen <var>n</var>=91, there are 8 possible values for <var>x</var>,
10
- namely : 9, 16, 22, 29, 53, 74, 79, 81. \n\rThus, C(91)=8.\n\nFind the sum of the
11
- positive numbers <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)10<sup>11</sup>
12
- for which C(<var>n</var>)=242.\n\n"
6
+ of the integers <var>x,</var> for which 1 ![<]({{ images_dir }}/symbol_lt.gif)<var>x</var>
7
+ ![<]({{ images_dir }}/symbol_lt.gif)<var>n</var> and \n <var>x</var><sup>3</sup>
8
+ ![≡]({{ images_dir }}/symbol_cong.gif)1 mod <var>n</var>.\n\nWhen <var>n</var>=91,
9
+ there are 8 possible values for <var>x</var>, namely : 9, 16, 22, 29, 53, 74, 79,
10
+ 81. \n\rThus, C(91)=8.\n\nFind the sum of the positive numbers <var>n</var> ![≤]({{
11
+ images_dir }}/symbol_le.gif)10<sup>11</sup> for which C(<var>n</var>)=242.\n\n"
@@ -3,15 +3,15 @@
3
3
  :name: Sum of Squares
4
4
  :url: http://projecteuler.net/problem=273
5
5
  :content: |+
6
- Consider equations of the form: <var>a</var><sup>2</sup> + <var>b</var><sup>2</sup> = <var>N</var>, 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>a</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>b</var>, <var>a</var>, <var>b</var> and <var>N</var> integer.
6
+ Consider equations of the form: <var>a</var><sup>2</sup> + <var>b</var><sup>2</sup> = <var>N</var>, 0 ![≤]({{ images_dir }}/symbol_le.gif) <var>a</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>b</var>, <var>a</var>, <var>b</var> and <var>N</var> integer.
7
7
 
8
8
  For <var>N</var>=65 there are two solutions:
9
9
 
10
10
  <var>a</var>=1, <var>b</var>=8 and <var>a</var>=4, <var>b</var>=7.
11
11
 
12
- We call S(<var>N</var>) the sum of the values of <var>a</var> of all solutions of <var>a</var><sup>2</sup> + <var>b</var><sup>2</sup> = <var>N</var>, 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>a</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>b</var>, <var>a</var>, <var>b</var> and <var>N</var> integer.
12
+ We call S(<var>N</var>) the sum of the values of <var>a</var> of all solutions of <var>a</var><sup>2</sup> + <var>b</var><sup>2</sup> = <var>N</var>, 0 ![≤]({{ images_dir }}/symbol_le.gif) <var>a</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>b</var>, <var>a</var>, <var>b</var> and <var>N</var> integer.
13
13
 
14
14
  Thus S(65) = 1 + 4 = 5.
15
15
 
16
- Find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)S(<var>N</var>), for all squarefree <var>N</var> only divisible by primes of the form 4<var>k</var>+1 with 4<var>k</var>+1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 150.
16
+ Find ![∑]({{ images_dir }}/symbol_sum.gif)S(<var>N</var>), for all squarefree <var>N</var> only divisible by primes of the form 4<var>k</var>+1 with 4<var>k</var>+1 ![<]({{ images_dir }}/symbol_lt.gif) 150.
17
17
 
@@ -2,19 +2,19 @@
2
2
  :id: 274
3
3
  :name: Divisibility Multipliers
4
4
  :url: http://projecteuler.net/problem=274
5
- :content: "For each integer <var>p</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
6
- 1 coprime to 10 there is a positive _divisibility multiplier_ <var>m</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
7
- <var>p</var> which preserves divisibility by <var>p</var> for the following function
8
- on any positive integer, <var>n</var>:\n\n<var>f</var>(<var>n</var>) = (all but
9
- the last digit of <var>n</var>) + (the last digit of <var>n</var>) \\* <var>m</var>\n\nThat
10
- is, if <var>m</var> is the divisibility multiplier for <var>p</var>, then <var>f</var>(<var>n</var>)
11
- is divisible by <var>p</var> if and only if <var>n</var> is divisible by <var>p</var>.\n\n(When
12
- <var>n</var> is much larger than <var>p</var>, <var>f</var>(<var>n</var>) will be
13
- less than <var>n</var> and repeated application of <var>f</var> provides a multiplicative
14
- divisibility test for <var>p</var>.)\n\nFor example, the divisibility multiplier
15
- for 113 is 34.\n\n<var>f</var>(76275) = 7627 + 5 \\* 34 = 7797 : 76275 and 7797
16
- are both divisible by 113 \n<var>f</var>(12345) = 1234 + 5 \\* 34 = 1404 : 12345
17
- and 1404 are both not divisible by 113\n\nThe sum of the divisibility multipliers
18
- for the primes that are coprime to 10 and less than 1000 is 39517. What is the sum
5
+ :content: "For each integer <var>p</var> ![>]({{ images_dir }}/symbol_gt.gif) 1 coprime
6
+ to 10 there is a positive _divisibility multiplier_ <var>m</var> ![<]({{ images_dir
7
+ }}/symbol_lt.gif) <var>p</var> which preserves divisibility by <var>p</var> for
8
+ the following function on any positive integer, <var>n</var>:\n\n<var>f</var>(<var>n</var>)
9
+ = (all but the last digit of <var>n</var>) + (the last digit of <var>n</var>) \\*
10
+ <var>m</var>\n\nThat is, if <var>m</var> is the divisibility multiplier for <var>p</var>,
11
+ then <var>f</var>(<var>n</var>) is divisible by <var>p</var> if and only if <var>n</var>
12
+ is divisible by <var>p</var>.\n\n(When <var>n</var> is much larger than <var>p</var>,
13
+ <var>f</var>(<var>n</var>) will be less than <var>n</var> and repeated application
14
+ of <var>f</var> provides a multiplicative divisibility test for <var>p</var>.)\n\nFor
15
+ example, the divisibility multiplier for 113 is 34.\n\n<var>f</var>(76275) = 7627
16
+ + 5 \\* 34 = 7797 : 76275 and 7797 are both divisible by 113 \n<var>f</var>(12345)
17
+ = 1234 + 5 \\* 34 = 1404 : 12345 and 1404 are both not divisible by 113\n\nThe sum
19
18
  of the divisibility multipliers for the primes that are coprime to 10 and less than
20
- 10<sup>7</sup>?\n\n"
19
+ 1000 is 39517. What is the sum of the divisibility multipliers for the primes that
20
+ are coprime to 10 and less than 10<sup>7</sup>?\n\n"
@@ -12,6 +12,6 @@
12
12
  to zero.\n\nWhen counting the sculptures, any arrangements which are simply reflections
13
13
  about the <var>y</var>-axis, are <u>not</u> counted as distinct. For example, the
14
14
  18 balanced sculptures of order 6 are shown below; note that each pair of mirror
15
- images (about the <var>y</var>-axis) is counted as one sculpture:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_275_sculptures2.gif)\n\nThere
16
- are 964 balanced sculptures of order 10 and 360505 of order 15. \nHow many balanced
17
- sculptures are there of order 18?\n\n"
15
+ images (about the <var>y</var>-axis) is counted as one sculpture:\n\n ![]({{ images_dir
16
+ }}/p_275_sculptures2.gif)\n\nThere are 964 balanced sculptures of order 10 and 360505
17
+ of order 15. \nHow many balanced sculptures are there of order 18?\n\n"
@@ -2,8 +2,8 @@
2
2
  :id: 276
3
3
  :name: Primitive Triangles
4
4
  :url: http://projecteuler.net/problem=276
5
- :content: "Consider the triangles with integer sides a, b and c with a ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- b ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) c. \n\rAn
7
- integer sided triangle (a,b,c) is called primitive if <dfn title=\" gcd(a,b,c)=gcd(a,gcd(b,c))\">
5
+ :content: "Consider the triangles with integer sides a, b and c with a ![≤]({{ images_dir
6
+ }}/symbol_le.gif) b ![≤]({{ images_dir }}/symbol_le.gif) c. \n\rAn integer sided
7
+ triangle (a,b,c) is called primitive if <dfn title=\" gcd(a,b,c)=gcd(a,gcd(b,c))\">
8
8
  gcd(a,b,c)</dfn>=1. \n\rHow many primitive integer sided triangles exist with
9
9
  a perimeter not exceeding 10 000 000?\n\n"
@@ -15,7 +15,7 @@
15
15
  corresponds to the steps \"DdDddUUdDD\".\n\nOf course, there are other sequences
16
16
  that begin with that same sequence \"DdDddUUdDD....\". \n\rFor instance, if <var>a</var><sub>1</sub>=1004064,
17
17
  then the sequence is DdDddUUdDDDdUDUUUdDdUUDDDUdDD. \n\rIn fact, 1004064 is the
18
- smallest possible <var>a</var><sub>1</sub> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
18
+ smallest possible <var>a</var><sub>1</sub> ![>]({{ images_dir }}/symbol_gt.gif)
19
19
  10<sup>6</sup> that begins with the sequence DdDddUUdDD.\n\nWhat is the smallest
20
- <var>a</var><sub>1</sub> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
21
- 10<sup>15</sup> that begins with the sequence \"UDDDUdddDDUDDddDdDddDDUDDdUUDd\"?\n\n"
20
+ <var>a</var><sub>1</sub> ![>]({{ images_dir }}/symbol_gt.gif) 10<sup>15</sup> that
21
+ begins with the sequence \"UDDDUdddDDUDDddDdDddDDUDDdUUDd\"?\n\n"
@@ -2,23 +2,21 @@
2
2
  :id: 278
3
3
  :name: Linear Combinations of Semiprimes
4
4
  :url: http://projecteuler.net/problem=278
5
- :content: "Given the values of integers 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
6
- <var>a</var><sub>1</sub> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
7
- <var>a</var><sub>2</sub> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)...
8
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>a</var><sub><var>n</var></sub>,
5
+ :content: "Given the values of integers 1 ![<]({{ images_dir }}/symbol_lt.gif) <var>a</var><sub>1</sub>
6
+ ![<]({{ images_dir }}/symbol_lt.gif) <var>a</var><sub>2</sub> ![<]({{ images_dir
7
+ }}/symbol_lt.gif)... ![<]({{ images_dir }}/symbol_lt.gif) <var>a</var><sub><var>n</var></sub>,
9
8
  consider the linear combination \n <var>q</var><sub>1</sub><var>a</var><sub>1</sub>
10
9
  + <var>q</var><sub>2</sub><var>a</var><sub>2</sub> + ... + <var>q</var><sub><var>n</var></sub><var>a</var><sub><var>n</var></sub>
11
- = <var>b</var>, using only integer values <var>q</var><sub><var>k</var></sub> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
12
- 0.\n\nNote that for a given set of <var>a</var><sub><var>k</var></sub>, it may be
13
- that not all values of <var>b</var> are possible. \n\rFor instance, if <var>a</var><sub>1</sub>
14
- = 5 and <var>a</var><sub>2</sub> = 7, there are no <var>q</var><sub>1</sub> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
15
- 0 and <var>q</var><sub>2</sub> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
16
- 0 such that <var>b</var> could be \n \r1, 2, 3, 4, 6, 8, 9, 11, 13, 16, 18 or 23.\r
17
- \ \n\rIn fact, 23 is the largest impossible value of <var>b</var> for <var>a</var><sub>1</sub>
18
- = 5 and <var>a</var><sub>2</sub> = 7. \n We therefore call <var>f</var>(5, 7) =
19
- 23. \n Similarly, it can be shown that <var>f</var>(6, 10, 15)=29 and <var>f</var>(14,
20
- 22, 77) = 195.\n\nFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)
10
+ = <var>b</var>, using only integer values <var>q</var><sub><var>k</var></sub> ![≥]({{
11
+ images_dir }}/symbol_ge.gif) 0.\n\nNote that for a given set of <var>a</var><sub><var>k</var></sub>,
12
+ it may be that not all values of <var>b</var> are possible. \n\rFor instance, if
13
+ <var>a</var><sub>1</sub> = 5 and <var>a</var><sub>2</sub> = 7, there are no <var>q</var><sub>1</sub>
14
+ ![≥]({{ images_dir }}/symbol_ge.gif) 0 and <var>q</var><sub>2</sub> ![≥]({{ images_dir
15
+ }}/symbol_ge.gif) 0 such that <var>b</var> could be \n \r1, 2, 3, 4, 6, 8, 9, 11,
16
+ 13, 16, 18 or 23.\r \n\rIn fact, 23 is the largest impossible value of <var>b</var>
17
+ for <var>a</var><sub>1</sub> = 5 and <var>a</var><sub>2</sub> = 7. \n We therefore
18
+ call <var>f</var>(5, 7) = 23. \n Similarly, it can be shown that <var>f</var>(6,
19
+ 10, 15)=29 and <var>f</var>(14, 22, 77) = 195.\n\nFind ![∑]({{ images_dir }}/symbol_sum.gif)
21
20
  <var>f</var>(<var>p*q,p*r,q*r</var>), where <var>p</var>, <var>q</var> and <var>r</var>
22
- are prime numbers and <var>p</var> &lt <var>q</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
23
- <var>r</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
24
- 5000.\n\n"
21
+ are prime numbers and <var>p</var> &lt <var>q</var> ![<]({{ images_dir }}/symbol_lt.gif)
22
+ <var>r</var> ![<]({{ images_dir }}/symbol_lt.gif) 5000.\n\n"
@@ -5,10 +5,10 @@
5
5
  :content: "You are given a pizza (perfect circle) that has been cut into <var>m</var>·<var>n</var>
6
6
  equal pieces and you want to have exactly one topping on each slice.\n\nLet <var>f</var>(<var>m</var>,<var>n</var>)
7
7
  denote the number of ways you can have toppings on the pizza with <var>m</var> different
8
- toppings (<var>m</var>  ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif) 2),
9
- using each topping on exactly <var>n</var> slices (<var>n</var>  ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif) 1).
8
+ toppings (<var>m</var>  ![≥]({{ images_dir }}/symbol_ge.gif) 2), using each topping
9
+ on exactly <var>n</var> slices (<var>n</var>  ![≥]({{ images_dir }}/symbol_ge.gif) 1).
10
10
  \ \nReflections are considered distinct, rotations are not.\n\nThus, for instance,
11
11
  <var>f</var>(2,1) = 1, <var>f</var>(2,2) = <var>f</var>(3,1) = 2 and <var>f</var>(3,2) = 16.
12
- \ \n<var>f</var>(3,2) is shown below:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_281_pizza.gif)\n\nFind
12
+ \ \n<var>f</var>(3,2) is shown below:\n\n ![]({{ images_dir }}/p_281_pizza.gif)\n\nFind
13
13
  the sum of all <var>f</var>(<var>m</var>,<var>n</var>) such that <var>f</var>(<var>m</var>,<var>n</var>) 
14
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>15</sup>.\n\n"
14
+ ![≤]({{ images_dir }}/symbol_le.gif) 10<sup>15</sup>.\n\n"
@@ -5,9 +5,9 @@
5
5
  :content: |+
6
6
  For non-negative integers <var>m</var>, <var>n</var>, the Ackermann function <var>A</var>(<var>m</var>, <var>n</var>) is defined as follows:
7
7
 
8
- ![](/home/will/src/euler-manager/config/../data/images/p_282_formula.gif)
8
+ ![]({{ images_dir }}/p_282_formula.gif)
9
9
 
10
10
  For example <var>A</var>(1, 0) = 2, <var>A</var>(2, 2) = 7 and <var>A</var>(3, 4) = 125.
11
11
 
12
- Find ![](/home/will/src/euler-manager/config/../data/images/p_282formula3.gif)<var>A</var>(<var>n</var>, <var>n</var>) and give your answer mod 14<sup>8</sup>.
12
+ Find ![]({{ images_dir }}/p_282formula3.gif)<var>A</var>(<var>n</var>, <var>n</var>) and give your answer mod 14<sup>8</sup>.
13
13
 
@@ -9,11 +9,10 @@
9
9
  the 3-digit number c37 is also a steady square: c37<sup>2</sup> = aa0c37, and the
10
10
  sum of its digits is c+3+7=18 in the same numbering system. The letters a, b, c
11
11
  and d are used for the 10, 11, 12 and 13 digits respectively, in a manner similar
12
- to the hexadecimal numbering system.\n\nFor 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
13
- n ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 9, the
14
- sum of the digits of all the n-digit steady squares in the base 14 numbering system
15
- is 2d8 (582 decimal). Steady squares with leading 0's are not allowed.\n\nFind the
16
- sum of the digits of all the n-digit steady squares in the base 14 numbering system
17
- for \n\r1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
18
- n ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10000 (decimal)
19
- and give your answer in the base 14 system using lower case letters where necessary.\n\n"
12
+ to the hexadecimal numbering system.\n\nFor 1 ![≤]({{ images_dir }}/symbol_le.gif)
13
+ n ![≤]({{ images_dir }}/symbol_le.gif) 9, the sum of the digits of all the n-digit
14
+ steady squares in the base 14 numbering system is 2d8 (582 decimal). Steady squares
15
+ with leading 0's are not allowed.\n\nFind the sum of the digits of all the n-digit
16
+ steady squares in the base 14 numbering system for \n\r1 ![≤]({{ images_dir }}/symbol_le.gif)
17
+ n ![≤]({{ images_dir }}/symbol_le.gif) 10000 (decimal) and give your answer in the
18
+ base 14 system using lower case letters where necessary.\n\n"