euler-manager 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (645) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -1
  3. data/Rakefile +3 -0
  4. data/bin/euler +28 -9
  5. data/config/config.rb +1 -0
  6. data/data/answers.yml +430 -456
  7. data/data/images/blackdot.gif +0 -0
  8. data/data/images/bracket_left.gif +0 -0
  9. data/data/images/bracket_right.gif +0 -0
  10. data/data/images/p295_lenticular.gif +0 -0
  11. data/data/images/p296_bisector.gif +0 -0
  12. data/data/images/p303_formula100.gif +0 -0
  13. data/data/images/p303_formula10000.gif +0 -0
  14. data/data/images/p392_gridlines.png +0 -0
  15. data/data/images/p400_winning.png +0 -0
  16. data/data/images/p411_longpath.png +0 -0
  17. data/data/images/p412_table53.png +0 -0
  18. data/data/images/p412_tablenums.png +0 -0
  19. data/data/images/p422_hyperbola.gif +0 -0
  20. data/data/images/p428_necklace.png +0 -0
  21. data/data/images/p_015.gif +0 -0
  22. data/data/images/p_068_1.gif +0 -0
  23. data/data/images/p_068_2.gif +0 -0
  24. data/data/images/p_085.gif +0 -0
  25. data/data/images/p_086.gif +0 -0
  26. data/data/images/p_090.gif +0 -0
  27. data/data/images/p_091_1.gif +0 -0
  28. data/data/images/p_091_2.gif +0 -0
  29. data/data/images/p_107_1.gif +0 -0
  30. data/data/images/p_107_2.gif +0 -0
  31. data/data/images/p_109.gif +0 -0
  32. data/data/images/p_126.gif +0 -0
  33. data/data/images/p_128.gif +0 -0
  34. data/data/images/p_138.gif +0 -0
  35. data/data/images/p_139.gif +0 -0
  36. data/data/images/p_143_torricelli.gif +0 -0
  37. data/data/images/p_144_1.gif +0 -0
  38. data/data/images/p_144_2.gif +0 -0
  39. data/data/images/p_147.gif +0 -0
  40. data/data/images/p_150.gif +0 -0
  41. data/data/images/p_151.gif +0 -0
  42. data/data/images/p_152_sum.gif +0 -0
  43. data/data/images/p_153_formule1.gif +0 -0
  44. data/data/images/p_153_formule2.gif +0 -0
  45. data/data/images/p_153_formule5.gif +0 -0
  46. data/data/images/p_153_formule6.gif +0 -0
  47. data/data/images/p_154_pyramid.gif +0 -0
  48. data/data/images/p_155_capacitors1.gif +0 -0
  49. data/data/images/p_155_capsform.gif +0 -0
  50. data/data/images/p_155_capsmu.gif +0 -0
  51. data/data/images/p_161_k9.gif +0 -0
  52. data/data/images/p_161_trio1.gif +0 -0
  53. data/data/images/p_161_trio3.gif +0 -0
  54. data/data/images/p_163.gif +0 -0
  55. data/data/images/p_173_square_laminas.gif +0 -0
  56. data/data/images/p_177_quad.gif +0 -0
  57. data/data/images/p_184.gif +0 -0
  58. data/data/images/p_189_colours.gif +0 -0
  59. data/data/images/p_189_grid.gif +0 -0
  60. data/data/images/p_194_Fig.png +0 -0
  61. data/data/images/p_194_GraphA.png +0 -0
  62. data/data/images/p_194_GraphB.png +0 -0
  63. data/data/images/p_199_circles_in_circles.gif +0 -0
  64. data/data/images/p_201_laserbeam.gif +0 -0
  65. data/data/images/p_208_robotwalk.gif +0 -0
  66. data/data/images/p_215_crackfree.gif +0 -0
  67. data/data/images/p_220.gif +0 -0
  68. data/data/images/p_226_formula.gif +0 -0
  69. data/data/images/p_226_scoop2.gif +0 -0
  70. data/data/images/p_228.png +0 -0
  71. data/data/images/p_237.gif +0 -0
  72. data/data/images/p_244_example.gif +0 -0
  73. data/data/images/p_244_start.gif +0 -0
  74. data/data/images/p_244_target.gif +0 -0
  75. data/data/images/p_246_anim.gif +0 -0
  76. data/data/images/p_246_ellipse.gif +0 -0
  77. data/data/images/p_247_hypersquares.gif +0 -0
  78. data/data/images/p_251_cardano.gif +0 -0
  79. data/data/images/p_252_convexhole.gif +0 -0
  80. data/data/images/p_255_Example.gif +0 -0
  81. data/data/images/p_255_Heron.gif +0 -0
  82. data/data/images/p_256_tatami3.gif +0 -0
  83. data/data/images/p_257_bisector.gif +0 -0
  84. data/data/images/p_262_formula1.gif +0 -0
  85. data/data/images/p_264_TriangleCentres.gif +0 -0
  86. data/data/images/p_265_BinaryCircles.gif +0 -0
  87. data/data/images/p_270_CutSquare.gif +0 -0
  88. data/data/images/p_275_sculptures2.gif +0 -0
  89. data/data/images/p_281_pizza.gif +0 -0
  90. data/data/images/p_282_formula.gif +0 -0
  91. data/data/images/p_282formula3.gif +0 -0
  92. data/data/images/p_287_quadtree.gif +0 -0
  93. data/data/images/p_289_euler.gif +0 -0
  94. data/data/images/p_291_formula.gif +0 -0
  95. data/data/images/p_299_ThreeSimTri.gif +0 -0
  96. data/data/images/p_300_protein.gif +0 -0
  97. data/data/images/p_306_pstrip.gif +0 -0
  98. data/data/images/p_309_ladders.gif +0 -0
  99. data/data/images/p_311_biclinic.gif +0 -0
  100. data/data/images/p_312_sierpinsky8t.gif +0 -0
  101. data/data/images/p_312_sierpinskyAt.gif +0 -0
  102. data/data/images/p_313_sliding_game_1.gif +0 -0
  103. data/data/images/p_313_sliding_game_2.gif +0 -0
  104. data/data/images/p_314_landgrab.gif +0 -0
  105. data/data/images/p_315_clocks.gif +0 -0
  106. data/data/images/p_316_decexp1.gif +0 -0
  107. data/data/images/p_316_decexp2.gif +0 -0
  108. data/data/images/p_316_decexp3.gif +0 -0
  109. data/data/images/p_321_swapping_counters_1.gif +0 -0
  110. data/data/images/p_321_swapping_counters_2.gif +0 -0
  111. data/data/images/p_326_formula1.gif +0 -0
  112. data/data/images/p_326_formula2.gif +0 -0
  113. data/data/images/p_327_rooms_of_doom.gif +0 -0
  114. data/data/images/p_328_sum1.gif +0 -0
  115. data/data/images/p_328_sum2.gif +0 -0
  116. data/data/images/p_330_formula.gif +0 -0
  117. data/data/images/p_331_crossflips1.gif +0 -0
  118. data/data/images/p_331_crossflips2.gif +0 -0
  119. data/data/images/p_331_crossflips3.gif +0 -0
  120. data/data/images/p_332_spherical.jpg +0 -0
  121. data/data/images/p_332_sum.gif +0 -0
  122. data/data/images/p_334_beans.gif +0 -0
  123. data/data/images/p_334_cases.gif +0 -0
  124. data/data/images/p_334_lfloor.gif +0 -0
  125. data/data/images/p_334_oplus.gif +0 -0
  126. data/data/images/p_334_rfloor.gif +0 -0
  127. data/data/images/p_335_mancala.gif +0 -0
  128. data/data/images/p_335_sum.gif +0 -0
  129. data/data/images/p_336_maximix.gif +0 -0
  130. data/data/images/p_338_gridpaper.gif +0 -0
  131. data/data/images/p_340_formula.gif +0 -0
  132. data/data/images/p_344_silverdollar.gif +0 -0
  133. data/data/images/p_351_hexorchard.png +0 -0
  134. data/data/images/p_354_bee_honeycomb.png +0 -0
  135. data/data/images/p_356_cubicpoly1.gif +0 -0
  136. data/data/images/p_356_cubicpoly2.gif +0 -0
  137. data/data/images/p_361_Thue-Morse1.gif +0 -0
  138. data/data/images/p_364_comf_dist.gif +0 -0
  139. data/data/images/p_372_pencilray1.jpg +0 -0
  140. data/data/images/p_372_pencilray2.gif +0 -0
  141. data/data/images/p_380_mazes.gif +0 -0
  142. data/data/images/p_384_formula.gif +0 -0
  143. data/data/images/p_385_ellipsetriangle.png +0 -0
  144. data/data/images/p_394_eatpie.gif +0 -0
  145. data/data/images/p_395_pythagorean.gif +0 -0
  146. data/data/images/p_404_c_ellipse.gif +0 -0
  147. data/data/images/p_405_tile1.png +0 -0
  148. data/data/images/p_405_tile2.gif +0 -0
  149. data/data/images/p_420_matrix.gif +0 -0
  150. data/data/images/p_424_kakuro1.gif +0 -0
  151. data/data/images/p_426_baxball1.gif +0 -0
  152. data/data/images/p_426_baxball2.gif +0 -0
  153. data/data/images/p_430_flips.gif +0 -0
  154. data/data/images/sod_13.gif +115 -0
  155. data/data/images/spacer.gif +0 -0
  156. data/data/images/symbol_asymp.gif +0 -0
  157. data/data/images/symbol_cong.gif +0 -0
  158. data/data/images/symbol_ge.gif +0 -0
  159. data/data/images/symbol_gt.gif +0 -0
  160. data/data/images/symbol_implies.gif +0 -0
  161. data/data/images/symbol_lceil.gif +0 -0
  162. data/data/images/symbol_le.gif +0 -0
  163. data/data/images/symbol_lfloor.gif +0 -0
  164. data/data/images/symbol_lt.gif +0 -0
  165. data/data/images/symbol_maps.gif +0 -0
  166. data/data/images/symbol_minus.gif +0 -0
  167. data/data/images/symbol_ne.gif +0 -0
  168. data/data/images/symbol_plusmn.gif +0 -0
  169. data/data/images/symbol_radic.gif +0 -0
  170. data/data/images/symbol_rceil.gif +0 -0
  171. data/data/images/symbol_rfloor.gif +0 -0
  172. data/data/images/symbol_sum.gif +0 -0
  173. data/data/images/symbol_times.gif +0 -0
  174. data/data/problems/1.yml +5 -3
  175. data/data/problems/10.yml +3 -4
  176. data/data/problems/100.yml +7 -9
  177. data/data/problems/101.yml +32 -45
  178. data/data/problems/102.yml +11 -12
  179. data/data/problems/103.yml +18 -22
  180. data/data/problems/104.yml +9 -11
  181. data/data/problems/105.yml +12 -17
  182. data/data/problems/106.yml +14 -15
  183. data/data/problems/107.yml +16 -16
  184. data/data/problems/108.yml +17 -28
  185. data/data/problems/109.yml +27 -29
  186. data/data/problems/11.yml +24 -29
  187. data/data/problems/110.yml +11 -15
  188. data/data/problems/111.yml +27 -17
  189. data/data/problems/112.yml +13 -11
  190. data/data/problems/113.yml +11 -9
  191. data/data/problems/114.yml +46 -100
  192. data/data/problems/115.yml +15 -12
  193. data/data/problems/116.yml +33 -72
  194. data/data/problems/117.yml +36 -78
  195. data/data/problems/118.yml +5 -5
  196. data/data/problems/119.yml +9 -7
  197. data/data/problems/12.yml +8 -9
  198. data/data/problems/120.yml +7 -13
  199. data/data/problems/121.yml +9 -11
  200. data/data/problems/122.yml +21 -38
  201. data/data/problems/123.yml +9 -9
  202. data/data/problems/124.yml +24 -54
  203. data/data/problems/125.yml +7 -8
  204. data/data/problems/126.yml +12 -13
  205. data/data/problems/127.yml +21 -27
  206. data/data/problems/128.yml +19 -14
  207. data/data/problems/129.yml +9 -8
  208. data/data/problems/13.yml +52 -2
  209. data/data/problems/130.yml +12 -15
  210. data/data/problems/131.yml +9 -8
  211. data/data/problems/132.yml +7 -8
  212. data/data/problems/133.yml +9 -9
  213. data/data/problems/134.yml +7 -15
  214. data/data/problems/135.yml +9 -16
  215. data/data/problems/136.yml +9 -13
  216. data/data/problems/137.yml +22 -32
  217. data/data/problems/138.yml +11 -16
  218. data/data/problems/139.yml +11 -11
  219. data/data/problems/14.yml +14 -24
  220. data/data/problems/140.yml +18 -25
  221. data/data/problems/141.yml +10 -11
  222. data/data/problems/142.yml +3 -10
  223. data/data/problems/143.yml +13 -16
  224. data/data/problems/144.yml +23 -26
  225. data/data/problems/145.yml +7 -7
  226. data/data/problems/146.yml +6 -6
  227. data/data/problems/147.yml +7 -8
  228. data/data/problems/148.yml +15 -7
  229. data/data/problems/149.yml +26 -35
  230. data/data/problems/15.yml +7 -7
  231. data/data/problems/150.yml +18 -29
  232. data/data/problems/151.yml +17 -15
  233. data/data/problems/152.yml +11 -8
  234. data/data/problems/153.yml +38 -53
  235. data/data/problems/154.yml +10 -12
  236. data/data/problems/155.yml +12 -15
  237. data/data/problems/156.yml +20 -22
  238. data/data/problems/157.yml +26 -28
  239. data/data/problems/158.yml +13 -14
  240. data/data/problems/159.yml +15 -25
  241. data/data/problems/16.yml +5 -2
  242. data/data/problems/160.yml +3 -4
  243. data/data/problems/161.yml +6 -10
  244. data/data/problems/162.yml +10 -11
  245. data/data/problems/163.yml +13 -15
  246. data/data/problems/164.yml +3 -3
  247. data/data/problems/165.yml +25 -28
  248. data/data/problems/166.yml +7 -11
  249. data/data/problems/167.yml +10 -12
  250. data/data/problems/168.yml +7 -9
  251. data/data/problems/169.yml +4 -5
  252. data/data/problems/17.yml +7 -7
  253. data/data/problems/170.yml +7 -10
  254. data/data/problems/171.yml +7 -9
  255. data/data/problems/172.yml +3 -2
  256. data/data/problems/173.yml +9 -7
  257. data/data/problems/174.yml +13 -15
  258. data/data/problems/175.yml +13 -15
  259. data/data/problems/176.yml +5 -5
  260. data/data/problems/177.yml +13 -12
  261. data/data/problems/178.yml +5 -5
  262. data/data/problems/179.yml +3 -6
  263. data/data/problems/18.yml +13 -17
  264. data/data/problems/180.yml +20 -25
  265. data/data/problems/181.yml +7 -3
  266. data/data/problems/182.yml +22 -27
  267. data/data/problems/183.yml +17 -23
  268. data/data/problems/184.yml +11 -14
  269. data/data/problems/185.yml +17 -18
  270. data/data/problems/186.yml +16 -24
  271. data/data/problems/187.yml +9 -12
  272. data/data/problems/188.yml +5 -6
  273. data/data/problems/189.yml +5 -7
  274. data/data/problems/19.yml +7 -8
  275. data/data/problems/190.yml +7 -9
  276. data/data/problems/191.yml +9 -10
  277. data/data/problems/192.yml +14 -22
  278. data/data/problems/193.yml +5 -3
  279. data/data/problems/194.yml +11 -14
  280. data/data/problems/195.yml +7 -9
  281. data/data/problems/196.yml +13 -21
  282. data/data/problems/197.yml +7 -11
  283. data/data/problems/198.yml +13 -16
  284. data/data/problems/199.yml +10 -10
  285. data/data/problems/2.yml +6 -6
  286. data/data/problems/20.yml +10 -18
  287. data/data/problems/200.yml +8 -8
  288. data/data/problems/201.yml +14 -16
  289. data/data/problems/202.yml +11 -10
  290. data/data/problems/203.yml +11 -16
  291. data/data/problems/204.yml +7 -7
  292. data/data/problems/205.yml +6 -6
  293. data/data/problems/206.yml +2 -2
  294. data/data/problems/207.yml +13 -16
  295. data/data/problems/208.yml +8 -8
  296. data/data/problems/209.yml +11 -23
  297. data/data/problems/21.yml +8 -9
  298. data/data/problems/210.yml +6 -6
  299. data/data/problems/211.yml +7 -7
  300. data/data/problems/212.yml +26 -36
  301. data/data/problems/213.yml +6 -7
  302. data/data/problems/214.yml +10 -11
  303. data/data/problems/215.yml +11 -14
  304. data/data/problems/216.yml +7 -10
  305. data/data/problems/217.yml +14 -23
  306. data/data/problems/218.yml +9 -10
  307. data/data/problems/219.yml +10 -15
  308. data/data/problems/22.yml +7 -9
  309. data/data/problems/220.yml +15 -20
  310. data/data/problems/221.yml +10 -16
  311. data/data/problems/222.yml +5 -3
  312. data/data/problems/223.yml +6 -8
  313. data/data/problems/224.yml +6 -8
  314. data/data/problems/225.yml +6 -7
  315. data/data/problems/226.yml +9 -12
  316. data/data/problems/227.yml +9 -9
  317. data/data/problems/228.yml +14 -17
  318. data/data/problems/229.yml +17 -25
  319. data/data/problems/23.yml +11 -15
  320. data/data/problems/230.yml +15 -19
  321. data/data/problems/231.yml +8 -12
  322. data/data/problems/232.yml +9 -10
  323. data/data/problems/233.yml +7 -6
  324. data/data/problems/234.yml +14 -19
  325. data/data/problems/235.yml +4 -5
  326. data/data/problems/236.yml +20 -22
  327. data/data/problems/237.yml +14 -9
  328. data/data/problems/238.yml +21 -33
  329. data/data/problems/239.yml +5 -5
  330. data/data/problems/24.yml +7 -6
  331. data/data/problems/240.yml +7 -7
  332. data/data/problems/241.yml +9 -12
  333. data/data/problems/242.yml +7 -9
  334. data/data/problems/243.yml +14 -15
  335. data/data/problems/244.yml +19 -28
  336. data/data/problems/245.yml +22 -30
  337. data/data/problems/246.yml +10 -13
  338. data/data/problems/247.yml +14 -17
  339. data/data/problems/248.yml +5 -2
  340. data/data/problems/249.yml +3 -3
  341. data/data/problems/25.yml +12 -11
  342. data/data/problems/250.yml +3 -3
  343. data/data/problems/251.yml +11 -9
  344. data/data/problems/252.yml +24 -25
  345. data/data/problems/253.yml +19 -32
  346. data/data/problems/254.yml +13 -17
  347. data/data/problems/255.yml +40 -50
  348. data/data/problems/256.yml +31 -39
  349. data/data/problems/257.yml +10 -14
  350. data/data/problems/258.yml +7 -9
  351. data/data/problems/259.yml +14 -12
  352. data/data/problems/26.yml +17 -7
  353. data/data/problems/260.yml +21 -25
  354. data/data/problems/261.yml +13 -15
  355. data/data/problems/262.yml +15 -16
  356. data/data/problems/263.yml +13 -15
  357. data/data/problems/264.yml +15 -16
  358. data/data/problems/265.yml +10 -12
  359. data/data/problems/266.yml +6 -6
  360. data/data/problems/267.yml +13 -10
  361. data/data/problems/268.yml +5 -4
  362. data/data/problems/269.yml +10 -11
  363. data/data/problems/27.yml +15 -21
  364. data/data/problems/270.yml +13 -13
  365. data/data/problems/271.yml +7 -9
  366. data/data/problems/272.yml +8 -11
  367. data/data/problems/273.yml +13 -17
  368. data/data/problems/274.yml +16 -19
  369. data/data/problems/275.yml +13 -15
  370. data/data/problems/276.yml +5 -7
  371. data/data/problems/277.yml +17 -20
  372. data/data/problems/278.yml +20 -28
  373. data/data/problems/279.yml +4 -3
  374. data/data/problems/28.yml +6 -13
  375. data/data/problems/280.yml +9 -9
  376. data/data/problems/281.yml +10 -13
  377. data/data/problems/282.yml +9 -6
  378. data/data/problems/283.yml +8 -8
  379. data/data/problems/284.yml +15 -18
  380. data/data/problems/285.yml +11 -11
  381. data/data/problems/286.yml +7 -8
  382. data/data/problems/287.yml +22 -32
  383. data/data/problems/288.yml +10 -11
  384. data/data/problems/289.yml +14 -15
  385. data/data/problems/29.yml +13 -20
  386. data/data/problems/290.yml +3 -4
  387. data/data/problems/291.yml +3 -6
  388. data/data/problems/292.yml +8 -9
  389. data/data/problems/293.yml +9 -10
  390. data/data/problems/294.yml +6 -6
  391. data/data/problems/295.yml +16 -21
  392. data/data/problems/296.yml +9 -11
  393. data/data/problems/297.yml +12 -15
  394. data/data/problems/298.yml +29 -29
  395. data/data/problems/299.yml +15 -21
  396. data/data/problems/3.yml +3 -3
  397. data/data/problems/30.yml +7 -8
  398. data/data/problems/300.yml +15 -16
  399. data/data/problems/301.yml +15 -17
  400. data/data/problems/302.yml +13 -14
  401. data/data/problems/303.yml +9 -7
  402. data/data/problems/304.yml +10 -15
  403. data/data/problems/305.yml +6 -10
  404. data/data/problems/306.yml +20 -24
  405. data/data/problems/307.yml +7 -8
  406. data/data/problems/308.yml +19 -30
  407. data/data/problems/309.yml +11 -12
  408. data/data/problems/31.yml +11 -14
  409. data/data/problems/310.yml +10 -15
  410. data/data/problems/311.yml +11 -17
  411. data/data/problems/312.yml +10 -11
  412. data/data/problems/313.yml +13 -13
  413. data/data/problems/314.yml +23 -25
  414. data/data/problems/315.yml +39 -45
  415. data/data/problems/316.yml +13 -13
  416. data/data/problems/317.yml +6 -7
  417. data/data/problems/318.yml +35 -57
  418. data/data/problems/319.yml +15 -19
  419. data/data/problems/32.yml +9 -10
  420. data/data/problems/320.yml +9 -8
  421. data/data/problems/321.yml +8 -9
  422. data/data/problems/322.yml +6 -8
  423. data/data/problems/323.yml +12 -15
  424. data/data/problems/324.yml +10 -13
  425. data/data/problems/325.yml +15 -21
  426. data/data/problems/326.yml +15 -8
  427. data/data/problems/327.yml +19 -23
  428. data/data/problems/328.yml +28 -31
  429. data/data/problems/329.yml +12 -13
  430. data/data/problems/33.yml +9 -9
  431. data/data/problems/330.yml +17 -36
  432. data/data/problems/331.yml +16 -22
  433. data/data/problems/332.yml +9 -11
  434. data/data/problems/333.yml +17 -20
  435. data/data/problems/334.yml +22 -34
  436. data/data/problems/335.yml +11 -12
  437. data/data/problems/336.yml +18 -20
  438. data/data/problems/337.yml +9 -11
  439. data/data/problems/338.yml +27 -37
  440. data/data/problems/339.yml +9 -9
  441. data/data/problems/34.yml +7 -3
  442. data/data/problems/340.yml +8 -10
  443. data/data/problems/341.yml +12 -14
  444. data/data/problems/342.yml +9 -13
  445. data/data/problems/343.yml +18 -25
  446. data/data/problems/344.yml +16 -17
  447. data/data/problems/345.yml +17 -22
  448. data/data/problems/346.yml +7 -7
  449. data/data/problems/347.yml +9 -12
  450. data/data/problems/348.yml +7 -8
  451. data/data/problems/349.yml +8 -9
  452. data/data/problems/35.yml +7 -4
  453. data/data/problems/350.yml +12 -14
  454. data/data/problems/351.yml +8 -9
  455. data/data/problems/352.yml +38 -42
  456. data/data/problems/353.yml +17 -21
  457. data/data/problems/354.yml +11 -13
  458. data/data/problems/355.yml +4 -4
  459. data/data/problems/356.yml +6 -6
  460. data/data/problems/357.yml +5 -5
  461. data/data/problems/358.yml +16 -25
  462. data/data/problems/359.yml +19 -22
  463. data/data/problems/36.yml +7 -4
  464. data/data/problems/360.yml +8 -8
  465. data/data/problems/361.yml +14 -15
  466. data/data/problems/362.yml +16 -28
  467. data/data/problems/363.yml +22 -23
  468. data/data/problems/364.yml +9 -11
  469. data/data/problems/365.yml +7 -13
  470. data/data/problems/366.yml +19 -22
  471. data/data/problems/367.yml +14 -15
  472. data/data/problems/368.yml +18 -35
  473. data/data/problems/369.yml +7 -11
  474. data/data/problems/37.yml +7 -6
  475. data/data/problems/370.yml +10 -13
  476. data/data/problems/371.yml +8 -9
  477. data/data/problems/372.yml +9 -12
  478. data/data/problems/373.yml +5 -6
  479. data/data/problems/374.yml +17 -21
  480. data/data/problems/375.yml +13 -17
  481. data/data/problems/376.yml +19 -21
  482. data/data/problems/377.yml +6 -7
  483. data/data/problems/378.yml +8 -11
  484. data/data/problems/379.yml +9 -11
  485. data/data/problems/38.yml +9 -13
  486. data/data/problems/380.yml +14 -17
  487. data/data/problems/381.yml +12 -18
  488. data/data/problems/382.yml +16 -19
  489. data/data/problems/383.yml +7 -9
  490. data/data/problems/384.yml +20 -24
  491. data/data/problems/385.yml +12 -16
  492. data/data/problems/386.yml +9 -11
  493. data/data/problems/387.yml +14 -15
  494. data/data/problems/388.yml +6 -8
  495. data/data/problems/389.yml +8 -8
  496. data/data/problems/39.yml +7 -6
  497. data/data/problems/390.yml +9 -14
  498. data/data/problems/391.yml +21 -25
  499. data/data/problems/392.yml +16 -17
  500. data/data/problems/393.yml +5 -6
  501. data/data/problems/394.yml +15 -18
  502. data/data/problems/395.yml +12 -13
  503. data/data/problems/396.yml +17 -22
  504. data/data/problems/397.yml +13 -16
  505. data/data/problems/398.yml +8 -9
  506. data/data/problems/399.yml +18 -18
  507. data/data/problems/4.yml +5 -4
  508. data/data/problems/40.yml +11 -14
  509. data/data/problems/400.yml +10 -11
  510. data/data/problems/401.yml +6 -7
  511. data/data/problems/402.yml +16 -21
  512. data/data/problems/403.yml +12 -14
  513. data/data/problems/404.yml +14 -16
  514. data/data/problems/405.yml +10 -11
  515. data/data/problems/406.yml +35 -41
  516. data/data/problems/407.yml +9 -16
  517. data/data/problems/408.yml +9 -9
  518. data/data/problems/409.yml +5 -7
  519. data/data/problems/41.yml +5 -4
  520. data/data/problems/410.yml +10 -13
  521. data/data/problems/411.yml +15 -19
  522. data/data/problems/412.yml +11 -15
  523. data/data/problems/413.yml +8 -8
  524. data/data/problems/414.yml +29 -34
  525. data/data/problems/415.yml +12 -15
  526. data/data/problems/416.yml +7 -7
  527. data/data/problems/417.yml +16 -17
  528. data/data/problems/418.yml +9 -12
  529. data/data/problems/419.yml +13 -18
  530. data/data/problems/42.yml +9 -10
  531. data/data/problems/420.yml +5 -6
  532. data/data/problems/421.yml +14 -25
  533. data/data/problems/422.yml +16 -18
  534. data/data/problems/423.yml +16 -18
  535. data/data/problems/424.yml +18 -19
  536. data/data/problems/425.yml +11 -12
  537. data/data/problems/426.yml +20 -21
  538. data/data/problems/427.yml +11 -13
  539. data/data/problems/428.yml +21 -25
  540. data/data/problems/429.yml +6 -6
  541. data/data/problems/43.yml +15 -13
  542. data/data/problems/430.yml +14 -16
  543. data/data/problems/44.yml +9 -12
  544. data/data/problems/45.yml +11 -11
  545. data/data/problems/46.yml +9 -14
  546. data/data/problems/47.yml +11 -16
  547. data/data/problems/48.yml +5 -3
  548. data/data/problems/49.yml +7 -6
  549. data/data/problems/5.yml +5 -4
  550. data/data/problems/50.yml +11 -6
  551. data/data/problems/51.yml +9 -11
  552. data/data/problems/52.yml +5 -4
  553. data/data/problems/53.yml +15 -24
  554. data/data/problems/54.yml +29 -39
  555. data/data/problems/55.yml +16 -17
  556. data/data/problems/56.yml +5 -7
  557. data/data/problems/57.yml +10 -11
  558. data/data/problems/58.yml +11 -18
  559. data/data/problems/59.yml +11 -19
  560. data/data/problems/6.yml +13 -9
  561. data/data/problems/60.yml +5 -6
  562. data/data/problems/61.yml +18 -26
  563. data/data/problems/62.yml +5 -5
  564. data/data/problems/63.yml +5 -3
  565. data/data/problems/64.yml +52 -126
  566. data/data/problems/65.yml +21 -47
  567. data/data/problems/66.yml +13 -23
  568. data/data/problems/67.yml +10 -13
  569. data/data/problems/68.yml +15 -19
  570. data/data/problems/69.yml +18 -10
  571. data/data/problems/7.yml +5 -2
  572. data/data/problems/70.yml +10 -12
  573. data/data/problems/71.yml +11 -13
  574. data/data/problems/72.yml +11 -12
  575. data/data/problems/73.yml +11 -12
  576. data/data/problems/74.yml +25 -37
  577. data/data/problems/75.yml +10 -12
  578. data/data/problems/76.yml +4 -4
  579. data/data/problems/77.yml +4 -4
  580. data/data/problems/78.yml +13 -8
  581. data/data/problems/79.yml +7 -7
  582. data/data/problems/8.yml +14 -8
  583. data/data/problems/80.yml +7 -7
  584. data/data/problems/81.yml +9 -15
  585. data/data/problems/82.yml +10 -15
  586. data/data/problems/83.yml +10 -19
  587. data/data/problems/84.yml +36 -59
  588. data/data/problems/85.yml +7 -5
  589. data/data/problems/86.yml +11 -11
  590. data/data/problems/87.yml +7 -8
  591. data/data/problems/88.yml +30 -49
  592. data/data/problems/89.yml +13 -14
  593. data/data/problems/9.yml +6 -9
  594. data/data/problems/90.yml +16 -18
  595. data/data/problems/91.yml +10 -15
  596. data/data/problems/92.yml +14 -25
  597. data/data/problems/93.yml +13 -17
  598. data/data/problems/94.yml +7 -7
  599. data/data/problems/95.yml +13 -19
  600. data/data/problems/96.yml +24 -40
  601. data/data/problems/97.yml +7 -10
  602. data/data/problems/98.yml +9 -12
  603. data/data/problems/99.yml +9 -12
  604. data/euler-manager.gemspec +1 -0
  605. data/example/1/README.md +4 -4
  606. data/example/15/README.md +8 -0
  607. data/example/15/python/15.py +5 -0
  608. data/example/15/python/euler.py +0 -0
  609. data/example/2/README.md +7 -5
  610. data/example/Eulerfile.rb +1 -0
  611. data/lib/euler/problem.rb +6 -1
  612. data/lib/euler/solution.rb +4 -2
  613. data/lib/euler/version.rb +1 -1
  614. data/rake/clean.rake +16 -0
  615. data/rake/update.rake +88 -0
  616. data/spec/euler/solution_spec.rb +2 -1
  617. data/templates/Eulerfile.rb +12 -0
  618. metadata +189 -29
  619. data/data/problems/431.yml +0 -33
  620. data/data/problems/432.yml +0 -13
  621. data/data/problems/433.yml +0 -18
  622. data/data/problems/434.yml +0 -32
  623. data/data/problems/435.yml +0 -21
  624. data/data/problems/436.yml +0 -21
  625. data/data/problems/437.yml +0 -22
  626. data/data/problems/438.yml +0 -29
  627. data/data/problems/439.yml +0 -17
  628. data/data/problems/440.yml +0 -21
  629. data/data/problems/441.yml +0 -23
  630. data/data/problems/442.yml +0 -9
  631. data/data/problems/443.yml +0 -13
  632. data/data/problems/444.yml +0 -28
  633. data/data/problems/445.yml +0 -37
  634. data/data/problems/446.yml +0 -29
  635. data/data/problems/447.yml +0 -31
  636. data/data/problems/448.yml +0 -14
  637. data/data/problems/449.yml +0 -17
  638. data/data/problems/450.yml +0 -26
  639. data/data/problems/451.yml +0 -15
  640. data/data/problems/452.yml +0 -8
  641. data/data/problems/453.yml +0 -16
  642. data/data/problems/454.yml +0 -17
  643. data/data/problems/455.yml +0 -16
  644. data/data/problems/456.yml +0 -15
  645. data/scripts/update_problems +0 -68
@@ -1,14 +1,13 @@
1
1
  ---
2
2
  :id: 141
3
- :name: Investigating progressive numbers, <i>n</i>, which are also square
3
+ :name: Investigating progressive numbers, _n_, which are also square
4
4
  :url: http://projecteuler.net/problem=141
5
- :content: "\r\n<p>A positive integer, <i>n</i>, is divided by <i>d</i> and the quotient
6
- and remainder are <i>q</i> and <i>r</i> respectively. In addition <i>d</i>, <i>q</i>,
7
- and <i>r</i> are consecutive positive integer terms in a geometric sequence, but
8
- not necessarily in that order.</p>\r\n<p>For example, 58 divided by 6 has quotient
9
- 9 and remainder 4. It can also be seen that 4, 6, 9 are consecutive terms in a geometric
10
- sequence (common ratio 3/2).<br>\r\nWe will call such numbers, <i>n</i>, progressive.</p>\r\n<p>Some
11
- progressive numbers, such as 9 and 10404 = 102<sup>2</sup>, happen to also be perfect
12
- squares.<br> The sum of all progressive perfect squares below one hundred thousand
13
- is 124657.</p>\r\n<p>Find the sum of all progressive perfect squares below one trillion
14
- (10<sup>12</sup>).</p>\r\n\r\n"
5
+ :content: "A positive integer, _n_, is divided by _d_ and the quotient and remainder
6
+ are _q_ and _r_ respectively. In addition _d_, _q_, and _r_ are consecutive positive
7
+ integer terms in a geometric sequence, but not necessarily in that order.\n\nFor
8
+ example, 58 divided by 6 has quotient 9 and remainder 4. It can also be seen that
9
+ 4, 6, 9 are consecutive terms in a geometric sequence (common ratio 3/2). \n\rWe
10
+ will call such numbers, _n_, progressive.\n\nSome progressive numbers, such as 9
11
+ and 10404 = 102<sup>2</sup>, happen to also be perfect squares. \n The sum of all
12
+ progressive perfect squares below one hundred thousand is 124657.\n\nFind the sum
13
+ of all progressive perfect squares below one trillion (10<sup>12</sup>).\n\n"
@@ -2,13 +2,6 @@
2
2
  :id: 142
3
3
  :name: Perfect Square Collection
4
4
  :url: http://projecteuler.net/problem=142
5
- :content: "\r\n<p>Find the smallest x + y + z with integers x <img src=\"images/symbol_gt.gif\"
6
- width=\"10\" height=\"10\" alt=\"&gt;\" border=\"0\" style=\"vertical-align:middle;\">
7
- y <img src=\"images/symbol_gt.gif\" width=\"10\" height=\"10\" alt=\"&gt;\" border=\"0\"
8
- style=\"vertical-align:middle;\"> z <img src=\"images/symbol_gt.gif\" width=\"10\"
9
- height=\"10\" alt=\"&gt;\" border=\"0\" style=\"vertical-align:middle;\"> 0 such
10
- that x + y, x <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
11
- border=\"0\" style=\"vertical-align:middle;\"> y, x + z, x <img src=\"images/symbol_minus.gif\"
12
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">
13
- z, y + z, y <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
14
- border=\"0\" style=\"vertical-align:middle;\"> z are all perfect squares.</p>\r\n"
5
+ :content: |+
6
+ Find the smallest x + y + z with integers x ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) y ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) z ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) 0 such that x + y, x ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) y, x + z, x ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) z, y + z, y ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) z are all perfect squares.
7
+
@@ -2,19 +2,16 @@
2
2
  :id: 143
3
3
  :name: Investigating the Torricelli point of a triangle
4
4
  :url: http://projecteuler.net/problem=143
5
- :content: "\r\n<p>Let ABC be a triangle with all interior angles being less than 120
6
- degrees. Let X be any point inside the triangle and let XA = p, XC = q, and XB =
7
- r.</p>\r\n<p>Fermat challenged Torricelli to find the position of X such that p
8
- + q + r was minimised.</p>\r\n<p>Torricelli was able to prove that if equilateral
9
- triangles AOB, BNC and AMC are constructed on each side of triangle ABC, the circumscribed
10
- circles of AOB, BNC, and AMC will intersect at a single point, T, inside the triangle.
11
- Moreover he proved that T, called the Torricelli/Fermat point, minimises p + q +
12
- r. Even more remarkable, it can be shown that when the sum is minimised, AN = BM
13
- = CO = p + q + r and that AN, BM and CO also intersect at T.</p>\r\n<div style=\"text-align:center;\"><img
14
- src=\"project/images/p_143_torricelli.gif\" width=\"564\" height=\"560\" alt=\"\"></div>\r\n<p>If
15
- the sum is minimised and a, b, c, p, q and r are all positive integers we shall
16
- call triangle ABC a Torricelli triangle. For example, a = 399, b = 455, c = 511
17
- is an example of a Torricelli triangle, with p + q + r = 784.</p>\r\n<p>Find the
18
- sum of all distinct values of p + q + r <img src=\"images/symbol_le.gif\" width=\"10\"
19
- height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\"> 120000 for
20
- Torricelli triangles.</p>\r\n\r\n"
5
+ :content: |+
6
+ Let ABC be a triangle with all interior angles being less than 120 degrees. Let X be any point inside the triangle and let XA = p, XC = q, and XB = r.
7
+
8
+ Fermat challenged Torricelli to find the position of X such that p + q + r was minimised.
9
+
10
+ Torricelli was able to prove that if equilateral triangles AOB, BNC and AMC are constructed on each side of triangle ABC, the circumscribed circles of AOB, BNC, and AMC will intersect at a single point, T, inside the triangle. Moreover he proved that T, called the Torricelli/Fermat point, minimises p + q + r. Even more remarkable, it can be shown that when the sum is minimised, AN = BM = CO = p + q + r and that AN, BM and CO also intersect at T.
11
+
12
+ ![](/home/will/src/euler-manager/config/../data/images/p_143_torricelli.gif)
13
+
14
+ If the sum is minimised and a, b, c, p, q and r are all positive integers we shall call triangle ABC a Torricelli triangle. For example, a = 399, b = 455, c = 511 is an example of a Torricelli triangle, with p + q + r = 784.
15
+
16
+ Find the sum of all distinct values of p + q + r ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 120000 for Torricelli triangles.
17
+
@@ -2,29 +2,26 @@
2
2
  :id: 144
3
3
  :name: Investigating multiple reflections of a laser beam
4
4
  :url: http://projecteuler.net/problem=144
5
- :content: "\r\n<p>In laser physics, a \"white cell\" is a mirror system that acts
6
- as a delay line for the laser beam. The beam enters the cell, bounces around on
7
- the mirrors, and eventually works its way back out.</p>\r\n<p>The specific white
8
- cell we will be considering is an ellipse with the equation 4<i>x</i><sup>2</sup>
9
- + <i>y</i><sup>2</sup> = 100</p>\r\n<p>The section corresponding to <img src=\"images/symbol_minus.gif\"
10
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">0.01
11
- <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\"
12
- style=\"vertical-align:middle;\"><i>x</i> <img src=\"images/symbol_le.gif\" width=\"10\"
13
- height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\"> +0.01 at
14
- the top is missing, allowing the light to enter and exit through the hole.</p>\r\n<div
15
- style=\"text-align:center;\">\n<img src=\"project/images/p_144_1.gif\" width=\"268\"
16
- height=\"240\" alt=\"\"><img src=\"project/images/p_144_2.gif\" width=\"141\" height=\"287\"
17
- alt=\"\">\n</div>\r\n<p>The light beam in this problem starts at the point (0.0,10.1)
18
- just outside the white cell, and the beam first impacts the mirror at (1.4,-9.6).</p>\r\n<p>Each
19
- time the laser beam hits the surface of the ellipse, it follows the usual law of
20
- reflection \"angle of incidence equals angle of reflection.\" That is, both the
21
- incident and reflected beams make the same angle with the normal line at the point
22
- of incidence.</p>\r\n<p>In the figure on the left, the red line shows the first
23
- two points of contact between the laser beam and the wall of the white cell; the
24
- blue line shows the line tangent to the ellipse at the point of incidence of the
25
- first bounce.</p>\n<p>The slope <i>m</i> of the tangent line at any point (<i>x</i>,<i>y</i>)
26
- of the given ellipse is: <i>m</i> = <img src=\"images/symbol_minus.gif\" width=\"9\"
27
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">4<i>x</i>/<i>y</i></p>\n<p>The
28
- normal line is perpendicular to this tangent line at the point of incidence.</p>\r\n<p>The
29
- animation on the right shows the first 10 reflections of the beam.</p>\r\n\r\n<p>How
30
- many times does the beam hit the internal surface of the white cell before exiting?</p>\r\n"
5
+ :content: |+
6
+ In laser physics, a "white cell" is a mirror system that acts as a delay line for the laser beam. The beam enters the cell, bounces around on the mirrors, and eventually works its way back out.
7
+
8
+ The specific white cell we will be considering is an ellipse with the equation 4_x_<sup>2</sup> + _y_<sup>2</sup> = 100
9
+
10
+ The section corresponding to ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)0.01 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _x_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) +0.01 at the top is missing, allowing the light to enter and exit through the hole.
11
+
12
+ ![](/home/will/src/euler-manager/config/../data/images/p_144_1.gif) ![](/home/will/src/euler-manager/config/../data/images/p_144_2.gif)
13
+
14
+ The light beam in this problem starts at the point (0.0,10.1) just outside the white cell, and the beam first impacts the mirror at (1.4,-9.6).
15
+
16
+ Each time the laser beam hits the surface of the ellipse, it follows the usual law of reflection "angle of incidence equals angle of reflection." That is, both the incident and reflected beams make the same angle with the normal line at the point of incidence.
17
+
18
+ In the figure on the left, the red line shows the first two points of contact between the laser beam and the wall of the white cell; the blue line shows the line tangent to the ellipse at the point of incidence of the first bounce.
19
+
20
+ The slope _m_ of the tangent line at any point (_x_,_y_) of the given ellipse is: _m_ = ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)4_x_/_y_
21
+
22
+ The normal line is perpendicular to this tangent line at the point of incidence.
23
+
24
+ The animation on the right shows the first 10 reflections of the beam.
25
+
26
+ How many times does the beam hit the internal surface of the white cell before exiting?
27
+
@@ -2,10 +2,10 @@
2
2
  :id: 145
3
3
  :name: How many reversible numbers are there below one-billion?
4
4
  :url: http://projecteuler.net/problem=145
5
- :content: "\r\n<p>Some positive integers <i>n</i> have the property that the sum [
6
- <i>n</i> + reverse(<i>n</i>) ] consists entirely of odd (decimal) digits. For instance,
7
- 36 + 63 = 99 and 409 + 904 = 1313. We will call such numbers <em>reversible</em>;
8
- so 36, 63, 409, and 904 are reversible. Leading zeroes are not allowed in either
9
- <i>n</i> or reverse(<i>n</i>).</p>\r\n\r\n<p>There are 120 reversible numbers below
10
- one-thousand.</p>\r\n\r\n<p>How many reversible numbers are there below one-billion
11
- (10<sup>9</sup>)?</p>\r\n"
5
+ :content: |+
6
+ Some positive integers _n_ have the property that the sum [_n_ + reverse(_n_)] consists entirely of odd (decimal) digits. For instance, 36 + 63 = 99 and 409 + 904 = 1313. We will call such numbers _reversible_; so 36, 63, 409, and 904 are reversible. Leading zeroes are not allowed in either _n_ or reverse(_n_).
7
+
8
+ There are 120 reversible numbers below one-thousand.
9
+
10
+ How many reversible numbers are there below one-billion (10<sup>9</sup>)?
11
+
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  :id: 146
3
- :name: 'Investigating a Prime Pattern '
3
+ :name: Investigating a Prime Pattern
4
4
  :url: http://projecteuler.net/problem=146
5
- :content: "\r\n<p>The smallest positive integer <i>n</i> for which the numbers <i>n</i><sup>2</sup>+1,
6
- <i>n</i><sup>2</sup>+3, <i>n</i><sup>2</sup>+7, <i>n</i><sup>2</sup>+9, <i>n</i><sup>2</sup>+13,
7
- and <i>n</i><sup>2</sup>+27 are consecutive primes is 10. The sum of all such integers
8
- <i>n</i> below one-million is 1242490.</p>\r\n\r\n<p>What is the sum of all such
9
- integers <i>n</i> below 150 million?</p>\r\n"
5
+ :content: |+
6
+ The smallest positive integer _n_ for which the numbers _n_<sup>2</sup>+1, _n_<sup>2</sup>+3, _n_<sup>2</sup>+7, _n_<sup>2</sup>+9, _n_<sup>2</sup>+13, and _n_<sup>2</sup>+27 are consecutive primes is 10. The sum of all such integers _n_ below one-million is 1242490.
7
+
8
+ What is the sum of all such integers _n_ below 150 million?
9
+
@@ -2,13 +2,12 @@
2
2
  :id: 147
3
3
  :name: Rectangles in cross-hatched grids
4
4
  :url: http://projecteuler.net/problem=147
5
- :content: "\r\n<p>In a 3x2 cross-hatched grid, a total of 37 different rectangles
6
- could be situated within that grid as indicated in the sketch.</p>\r\n<div style=\"text-align:center;\"><img
7
- src=\"project/images/p_147.gif\" width=\"361\" height=\"176\" alt=\"\"></div>\r\n<p>There
5
+ :content: "In a 3x2 cross-hatched grid, a total of 37 different rectangles could be
6
+ situated within that grid as indicated in the sketch.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_147.gif)\n\nThere
8
7
  are 5 grids smaller than 3x2, vertical and horizontal dimensions being important,
9
8
  i.e. 1x1, 2x1, 3x1, 1x2 and 2x2. If each of them is cross-hatched, the following
10
- number of different rectangles could be situated within those smaller grids:</p>\r\n<p>1x1:
11
- 1\r\n<br>2x1: 4\r\n<br>3x1: 8\r\n<br>1x2: 4\r\n<br>2x2: 18</p>\r\n\r\n<p>Adding
12
- those to the 37 of the 3x2 grid, a total of 72 different rectangles could be situated
13
- within 3x2 and smaller grids.</p>\r\n\r\n<p>How many different rectangles could
14
- be situated within 47x43 and smaller grids?</p>\r\n"
9
+ number of different rectangles could be situated within those smaller grids:\n\n1x1:
10
+ 1\r \n2x1: 4\r \n3x1: 8\r \n1x2: 4\r \n2x2: 18\n\nAdding those to the 37 of
11
+ the 3x2 grid, a total of 72 different rectangles could be situated within 3x2 and
12
+ smaller grids.\n\nHow many different rectangles could be situated within 47x43 and
13
+ smaller grids?\n\n"
@@ -2,10 +2,18 @@
2
2
  :id: 148
3
3
  :name: Exploring Pascal's triangle
4
4
  :url: http://projecteuler.net/problem=148
5
- :content: "\r\n<p>We can easily verify that none of the entries in the first seven
6
- rows of Pascal's triangle are divisible by 7:</p>\r\n<table cellpadding=\"0\" cellspacing=\"0\"
7
- border=\"0\" align=\"center\">\n<tr>\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> 1</td>\r\n</tr>\n<tr>\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> 1</td>\r\n<td> </td>\r\n<td> 1</td>\r\n</tr>\n<tr>\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> 1</td>\r\n<td> </td>\r\n<td> 2</td>\r\n<td> </td>\r\n<td> 1</td>\r\n</tr>\n<tr>\n<td> </td>\r\n<td> </td>\r\n<td> </td>\r\n<td> 1</td>\r\n<td> </td>\r\n<td> 3</td>\r\n<td> </td>\r\n<td> 3</td>\r\n<td> </td>\r\n<td> 1</td>\r\n</tr>\n<tr>\n<td> </td>\r\n<td> </td>\r\n<td> 1</td>\r\n<td> </td>\r\n<td> 4</td>\r\n<td> </td>\r\n<td> 6</td>\r\n<td> </td>\r\n<td> 4</td>\r\n<td> </td>\r\n<td> 1</td>\r\n</tr>\n<tr>\n<td> </td>\r\n<td> 1</td>\r\n<td> </td>\r\n<td> 5</td>\r\n<td> </td>\r\n<td>10</td>\r\n<td> </td>\r\n<td>10</td>\r\n<td> </td>\r\n<td> 5</td>\r\n<td> </td>\r\n<td> 1</td>\r\n</tr>\n<tr>\n<td>1</td>\r\n<td> </td>\r\n<td> 6</td>\r\n<td> </td>\r\n<td>15</td>\r\n<td> </td>\r\n<td>20</td>\r\n<td> </td>\r\n<td>15</td>\r\n<td> </td>\r\n<td> 6</td>\r\n<td> </td>\r\n<td> 1</td>\r\n</tr>\n</table>\n<p>However,
8
- if we check the first one hundred rows, we will find that only 2361 of the 5050
9
- entries are <i>not</i> divisible by 7.</p>\r\n\r\n<p>Find the number of entries
10
- which are <i>not</i> divisible by 7 in the first one billion (10<sup>9</sup>) rows
11
- of Pascal's triangle.</p>\r\n"
5
+ :content: |+
6
+ We can easily verify that none of the entries in the first seven rows of Pascal's triangle are divisible by 7:
7
+
8
+ |   |   |   |   |   |   |  1 |
9
+ |   |   |   |   |   |  1 |   |  1 |
10
+ |   |   |   |   |  1 |   |  2 |   |  1 |
11
+ |   |   |   |  1 |   |  3 |   |  3 |   |  1 |
12
+ |   |   |  1 |   |  4 |   |  6 |   |  4 |   |  1 |
13
+ |   |  1 |   |  5 |   | 10 |   | 10 |   |  5 |   |  1 |
14
+ | 1 |   |  6 |   | 15 |   | 20 |   | 15 |   |  6 |   |  1 |
15
+
16
+ However, if we check the first one hundred rows, we will find that only 2361 of the 5050 entries are _not_ divisible by 7.
17
+
18
+ Find the number of entries which are _not_ divisible by 7 in the first one billion (10<sup>9</sup>) rows of Pascal's triangle.
19
+
@@ -2,40 +2,31 @@
2
2
  :id: 149
3
3
  :name: Searching for a maximum-sum subsequence
4
4
  :url: http://projecteuler.net/problem=149
5
- :content: "\r\n<p>Looking at the table below, it is easy to verify that the maximum
6
- possible sum of adjacent numbers in any direction (horizontal, vertical, diagonal
7
- or anti-diagonal) <span style=\"white-space:nowrap\">is 16 (= 8 + 7 + 1).</span></p>\r\n\r\n<div
8
- style=\"text-align:center\">\r\n<table border=\"1\" cellpadding=\"6\" cellspacing=\"0\"
9
- style=\"margin:auto\"><tbody align=\"right\">\n<tr>\n<td>\n<img src=\"images/symbol_minus.gif\"
10
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2</td>\n<td>5</td>\n<td>3</td>\n<td>2</td>\n</tr>\n<tr>\n<td>9</td>\n<td>\n<img
11
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
12
- style=\"vertical-align:middle;\">6</td>\n<td>5</td>\n<td>1</td>\n</tr>\n<tr>\n<td>3</td>\n<td>2</td>\n<td>7</td>\n<td>3</td>\n</tr>\n<tr>\n<td>\n<img
13
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
14
- style=\"vertical-align:middle;\">1</td>\n<td>8</td>\n<td>\n<img src=\"images/symbol_minus.gif\"
5
+ :content: "Looking at the table below, it is easy to verify that the maximum possible
6
+ sum of adjacent numbers in any direction (horizontal, vertical, diagonal or anti-diagonal)
7
+ is 16 (= 8 + 7 + 1).\n\n<tbody align=\"right\">\n<tr>\n<td>\n<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
8
+ width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2</td>\n<td>5</td>\n<td>3</td>\n<td>2</td>\n</tr>\r\n<tr>\n<td>9</td>\n<td>\n<img
9
+ src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
10
+ border=\"0\" style=\"vertical-align:middle;\">6</td>\n<td>5</td>\n<td>1</td>\n</tr>\r\n<tr>\n<td>3</td>\n<td>2</td>\n<td>7</td>\n<td>3</td>\n</tr>\r\n<tr>\n<td>\n<img
11
+ src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
12
+ border=\"0\" style=\"vertical-align:middle;\">1</td>\n<td>8</td>\n<td>\n<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
15
13
  width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">4</td>\n<td> 
16
- 8</td>\n</tr>\n</tbody></table>\n</div>\r\n\r\n<p>Now, let us repeat the search,
17
- but on a much larger scale:</p>\r\n\r\n<p>First, generate four million pseudo-random
18
- numbers using a specific form of what is known as a \"Lagged Fibonacci Generator\":</p>\r\n\r\n<p>For
19
- 1 <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\"
20
- style=\"vertical-align:middle;\"><i>k</i> <img src=\"images/symbol_le.gif\" width=\"10\"
21
- height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\"> 55, <i>s</i><sub><i>k</i></sub>
22
- = [100003 <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
23
- border=\"0\" style=\"vertical-align:middle;\"> 200003<i>k</i> + 300007<i>k</i><sup>3</sup>]
24
- (modulo 1000000) <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
25
- border=\"0\" style=\"vertical-align:middle;\"> 500000.<br>\r\nFor 56 <img src=\"images/symbol_le.gif\"
26
- width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\"><i>k</i>
27
- <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\"
28
- style=\"vertical-align:middle;\"> 4000000, <i>s</i><sub><i>k</i></sub> = [<i>s</i><sub><i>k<img
29
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
30
- style=\"vertical-align:middle;\">24</i></sub> + <i>s</i><sub><i>k<img src=\"images/symbol_minus.gif\"
31
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">55</i></sub>
32
- + 1000000] (modulo 1000000) <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\"
33
- alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"> 500000.</p>\r\n\r\n<p>Thus,
34
- <i>s</i><sub>10</sub> = <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\"
35
- alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">393027 and <i>s</i><sub>100</sub>
36
- = 86613.</p>\r\n\r\n<p>The terms of <i>s</i> are then arranged in a 2000<img src=\"images/symbol_times.gif\"
37
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">2000
14
+ 8</td>\n</tr>\n</tbody>\n\nNow, let us repeat the search, but on a much larger scale:\n\nFirst,
15
+ generate four million pseudo-random numbers using a specific form of what is known
16
+ as a \"Lagged Fibonacci Generator\":\n\nFor 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
17
+ _k_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 55, _s_<sub><i>k</i></sub>
18
+ = [100003 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
19
+ 200003_k_ + 300007_k_<sup>3</sup>] (modulo 1000000) ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
20
+ 500000. \n\rFor 56 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
21
+ _k_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 4000000,
22
+ _s_<sub><i>k</i></sub> = [_s_<sub><i>k<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
23
+ width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">24</i></sub>
24
+ + _s_<sub><i>k<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\"
25
+ height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">55</i></sub>
26
+ + 1000000] (modulo 1000000) ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
27
+ 500000.\n\nThus, _s_<sub>10</sub> = ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)393027
28
+ and _s_<sub>100</sub> = 86613.\n\nThe terms of _s_ are then arranged in a 2000 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2000
38
29
  table, using the first 2000 numbers to fill the first row (sequentially), the next
39
- 2000 numbers to fill the second row, and so on.</p>\r\n\r\n<p>Finally, find the
40
- greatest sum of (any number of) adjacent entries in any direction (horizontal, vertical,
41
- diagonal or anti-diagonal).</p>\r\n"
30
+ 2000 numbers to fill the second row, and so on.\n\nFinally, find the greatest sum
31
+ of (any number of) adjacent entries in any direction (horizontal, vertical, diagonal
32
+ or anti-diagonal).\n\n"
data/data/problems/15.yml CHANGED
@@ -2,10 +2,10 @@
2
2
  :id: 15
3
3
  :name: Lattice paths
4
4
  :url: http://projecteuler.net/problem=15
5
- :content: "\r\n<p>Starting in the top left corner of a 2<img src=\"images/symbol_times.gif\"
6
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">2
7
- grid, and only being able to move to the right and down, there are exactly 6 routes
8
- to the bottom right corner.</p>\r\n<div style=\"text-align:center;\">\r\n<img src=\"project/images/p_015.gif\"
9
- alt=\"\">\n</div>\r\n<p>How many such routes are there through a 20<img src=\"images/symbol_times.gif\"
10
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">20
11
- grid?</p>\r\n\r\n"
5
+ :content: |+
6
+ Starting in the top left corner of a 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
7
+
8
+ ![](/home/will/src/euler-manager/config/../data/images/p_015.gif)
9
+
10
+ How many such routes are there through a 20 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)20 grid?
11
+
@@ -2,33 +2,22 @@
2
2
  :id: 150
3
3
  :name: Searching a triangular array for a sub-triangle having minimum-sum
4
4
  :url: http://projecteuler.net/problem=150
5
- :content: "\r\n<p>In a triangular array of positive and negative integers, we wish
6
- to find a sub-triangle such that the sum of the numbers it contains is the smallest
7
- possible.</p>\r\n<p>In the example below, it can be easily verified that the marked
8
- triangle satisfies this condition having a sum of <img src=\"images/symbol_minus.gif\"
9
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">42.</p>\r\n<div
10
- style=\"text-align:center;\">\r\n<img src=\"http://projecteuler.net/project/images/p_150.gif\"
11
- border=\"0\" alt=\"\">\n</div>\r\n<p>We wish to make such a triangular array with
12
- one thousand rows, so we generate 500500 pseudo-random numbers <span style=\"font-style:
13
- italic\">s<sub>k</sub></span> in the range <img src=\"images/symbol_plusmn.gif\"
14
- width=\"11\" height=\"11\" alt=\"±\" border=\"0\" style=\"vertical-align:middle;\">2<sup>19</sup>,
5
+ :content: "In a triangular array of positive and negative integers, we wish to find
6
+ a sub-triangle such that the sum of the numbers it contains is the smallest possible.\n\nIn
7
+ the example below, it can be easily verified that the marked triangle satisfies
8
+ this condition having a sum of ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)42.\n\n
9
+ ![](/home/will/src/euler-manager/config/../data/images/p_150.gif)\n\nWe wish to
10
+ make such a triangular array with one thousand rows, so we generate 500500 pseudo-random
11
+ numbers s<sub>k</sub> in the range ![±](/home/will/src/euler-manager/config/../data/images/symbol_plusmn.gif)2<sup>19</sup>,
15
12
  using a type of random number generator (known as a Linear Congruential Generator)
16
- as follows:</p>\r\n<p style=\"margin-left:50px;\"><span style=\"font-style: italic\">t</span>
17
- := 0\r\n<br>\r\nfor k = 1 up to k = 500500:\r\n<br>\r\n    <span style=\"font-style:
18
- italic\">t</span> := (615949*<span style=\"font-style: italic\">t</span> + 797807)
19
- modulo 2<sup>20</sup><br>\r\n    <span style=\"font-style: italic\">s<sub>k</sub></span>
20
- := <span style=\"font-style: italic\">t</span><img src=\"images/symbol_minus.gif\"
21
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2<sup>19</sup></p>\r\n<p>Thus:
22
- <span style=\"font-style: italic\">s<sub>1</sub></span> = 273519, <span style=\"font-style:
23
- italic\">s<sub>2</sub></span> = <img src=\"images/symbol_minus.gif\" width=\"9\"
24
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">153582, <span
25
- style=\"font-style: italic\">s<sub>3</sub></span> = 450905 etc</p>\r\n<p>Our triangular
26
- array is then formed using the pseudo-random numbers thus:</p>\r\n<div style=\"text-align:center;font-style:
27
- italic;\">\r\ns<sub>1</sub><br>\r\ns<sub>2</sub>  s<sub>3</sub><br>\r\ns<sub>4</sub> 
28
- s<sub>5</sub>  s<sub>6</sub>  \r\n<br>\r\ns<sub>7</sub>  s<sub>8</sub>  s<sub>9</sub> 
29
- s<sub>10</sub><br>\r\n...\r\n</div>\r\n<p>Sub-triangles can start at any element
30
- of the array and extend down as far as we like (taking-in the two elements directly
31
- below it from the next row, the three elements directly below from the row after
32
- that, and so on).\r\n<br>\r\nThe \"sum of a sub-triangle\" is defined as the sum
33
- of all the elements it contains.\r\n<br>\r\nFind the smallest possible sub-triangle
34
- sum.</p>\r\n"
13
+ as follows:\n\nt := 0\r \n\rfor k = 1 up to k = 500500:\r \n\r    t := (615949\\*t
14
+ + 797807) modulo 2<sup>20</sup> \n\r    s<sub>k</sub> := t ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2<sup>19</sup>\n\nThus:
15
+ s<sub>1</sub> = 273519, s<sub>2</sub> = ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)153582,
16
+ s<sub>3</sub> = 450905 etc\n\nOur triangular array is then formed using the pseudo-random
17
+ numbers thus:\n\n\rs<sub>1</sub> \n\rs<sub>2</sub>  s<sub>3</sub> \n\rs<sub>4</sub> 
18
+ s<sub>5</sub>  s<sub>6</sub>  \r \n\rs<sub>7</sub>  s<sub>8</sub>  s<sub>9</sub> 
19
+ s<sub>10</sub> \n\r...\r\n\nSub-triangles can start at any element of the array
20
+ and extend down as far as we like (taking-in the two elements directly below it
21
+ from the next row, the three elements directly below from the row after that, and
22
+ so on).\r \n\rThe \"sum of a sub-triangle\" is defined as the sum of all the elements
23
+ it contains.\r \n\rFind the smallest possible sub-triangle sum.\n\n"
@@ -2,18 +2,20 @@
2
2
  :id: 151
3
3
  :name: 'Paper sheets of standard sizes: an expected-value problem'
4
4
  :url: http://projecteuler.net/problem=151
5
- :content: "\r\n<p>A printing shop runs 16 batches (jobs) every week and each batch
6
- requires a sheet of special colour-proofing paper of size A5.</p>\r\n<p>Every Monday
7
- morning, the foreman opens a new envelope, containing a large sheet of the special
8
- paper with size A1.</p>\r\n<p>He proceeds to cut it in half, thus getting two sheets
9
- of size A2. Then he cuts one of them in half to get two sheets of size A3 and so
10
- on until he obtains the A5-size sheet needed for the first batch of the week.</p>\r\n<p>All
11
- the unused sheets are placed back in the envelope.</p>\r\n<div style=\"text-align:center;\"><img
12
- src=\"project/images/p_151.gif\" width=\"314\" height=\"227\" alt=\"\"></div>\r\n<p>At
13
- the beginning of each subsequent batch, he takes from the envelope one sheet of
14
- paper at random. If it is of size A5, he uses it. If it is larger, he repeats the
15
- 'cut-in-half' procedure until he has what he needs and any remaining sheets are
16
- always placed back in the envelope.</p>\r\n<p>Excluding the first and last batch
17
- of the week, find the expected number of times (during each week) that the foreman
18
- finds a single sheet of paper in the envelope.</p>\r\n<p>Give your answer rounded
19
- to six decimal places using the format x.xxxxxx .</p>\r\n"
5
+ :content: |+
6
+ A printing shop runs 16 batches (jobs) every week and each batch requires a sheet of special colour-proofing paper of size A5.
7
+
8
+ Every Monday morning, the foreman opens a new envelope, containing a large sheet of the special paper with size A1.
9
+
10
+ He proceeds to cut it in half, thus getting two sheets of size A2. Then he cuts one of them in half to get two sheets of size A3 and so on until he obtains the A5-size sheet needed for the first batch of the week.
11
+
12
+ All the unused sheets are placed back in the envelope.
13
+
14
+ ![](/home/will/src/euler-manager/config/../data/images/p_151.gif)
15
+
16
+ At the beginning of each subsequent batch, he takes from the envelope one sheet of paper at random. If it is of size A5, he uses it. If it is larger, he repeats the 'cut-in-half' procedure until he has what he needs and any remaining sheets are always placed back in the envelope.
17
+
18
+ Excluding the first and last batch of the week, find the expected number of times (during each week) that the foreman finds a single sheet of paper in the envelope.
19
+
20
+ Give your answer rounded to six decimal places using the format x.xxxxxx .
21
+
@@ -2,11 +2,14 @@
2
2
  :id: 152
3
3
  :name: Writing 1/2 as a sum of inverse squares
4
4
  :url: http://projecteuler.net/problem=152
5
- :content: "\r\n<p>There are several ways to write the number 1/2 as a sum of inverse
6
- squares using <i>distinct</i> integers.</p>\r\n<p>For instance, the numbers {2,3,4,5,7,12,15,20,28,35}
7
- can be used:</p>\r\n<p style=\"margin-left:50px;\"><img src=\"http://projecteuler.net/project/images/p_152_sum.gif\"
8
- border=\"0\" alt=\"\"></p>\r\n<p>In fact, only using integers between 2 and 45 inclusive,
9
- there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45}
10
- and {2,3,4,6,7,9,12,15,28,30,35,36,45}.</p>\r\n<p>How many ways are there to write
11
- the number 1/2 as a sum of inverse squares using distinct integers between 2 and
12
- 80 inclusive?</p>\r\n"
5
+ :content: |+
6
+ There are several ways to write the number 1/2 as a sum of inverse squares using _distinct_ integers.
7
+
8
+ For instance, the numbers {2,3,4,5,7,12,15,20,28,35} can be used:
9
+
10
+ ![](/home/will/src/euler-manager/config/../data/images/p_152_sum.gif)
11
+
12
+ In fact, only using integers between 2 and 45 inclusive, there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45} and {2,3,4,6,7,9,12,15,28,30,35,36,45}.
13
+
14
+ How many ways are there to write the number 1/2 as a sum of inverse squares using distinct integers between 2 and 80 inclusive?
15
+
@@ -2,56 +2,41 @@
2
2
  :id: 153
3
3
  :name: Investigating Gaussian Integers
4
4
  :url: http://projecteuler.net/problem=153
5
- :content: "\r\n<p>As we all know the equation <var>x</var><sup>2</sup>=-1 has no solutions
6
- for real <var>x</var>.\r\n<br>\r\nIf we however introduce the imaginary number <var>i</var>
7
- this equation has two solutions: <var>x=i</var> and <var>x=-i</var>.\r\n<br>\r\nIf
8
- we go a step further the equation (<var>x</var>-3)<sup>2</sup>=-4 has two complex
9
- solutions: <var>x</var>=3+2<var>i</var> and <var>x</var>=3-2<var>i</var>.\r\n<br><var>x</var>=3+2<var>i</var>
10
- and <var>x</var>=3-2<var>i</var> are called each others' complex conjugate.\r\n<br>\r\nNumbers
11
- of the form <var>a</var>+<var>bi</var> are called complex numbers.\r\n<br>\r\nIn
12
- general <var>a</var>+<var>bi</var> and <var>a</var><img src=\"images/symbol_minus.gif\"
13
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><var>bi</var>
14
- are each other's complex conjugate.</p>\r\n<p>A Gaussian Integer is a complex number
15
- <var>a</var>+<var>bi</var> such that both <var>a</var> and <var>b</var> are integers.\r\n<br>\r\nThe
16
- regular integers are also Gaussian integers (with <var>b</var>=0).\r\n<br>\r\nTo
17
- distinguish them from Gaussian integers with <var>b</var> <img src=\"images/symbol_ne.gif\"
18
- width=\"11\" height=\"10\" alt=\"≠\" border=\"0\" style=\"vertical-align:middle;\">
19
- 0 we call such integers \"rational integers.\"\r\n<br>\r\nA Gaussian integer is
20
- called a divisor of a rational integer <var>n</var> if the result is also a Gaussian
21
- integer.\r\n<br>\r\nIf for example we divide 5 by 1+2<var>i</var> we can simplify
22
- <img src=\"project/images/p_153_formule1.gif\" border=\"0\" style=\"vertical-align:middle\"
23
- alt=\"\"> in the following manner:\r\n<br>\r\nMultiply numerator and denominator
24
- by the complex conjugate of 1+2<var>i</var>: 1<img src=\"images/symbol_minus.gif\"
25
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2<var>i</var>.\r\n<br>\r\nThe
26
- result is \r\n<img src=\"project/images/p_153_formule2.gif\" border=\"0\" alt=\"\"
27
- style=\"vertical-align:middle;\">.\r\n<br>\r\nSo 1+2<var>i</var> is a divisor of
28
- 5.\r\n<br>\r\nNote that 1+<var>i</var> is not a divisor of 5 because <img src=\"project/images/p_153_formule5.gif\"
29
- border=\"0\" style=\"vertical-align:middle;\" alt=\"\">.\r\n<br>\r\nNote also that
30
- if the Gaussian Integer (<var>a</var>+<var>bi</var>) is a divisor of a rational
31
- integer <var>n</var>, then its complex conjugate (<var>a</var><img src=\"images/symbol_minus.gif\"
32
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><var>bi</var>)
33
- is also a divisor of <var>n</var>.</p>\r\n<p>In fact, 5 has six divisors such that
34
- the real part is positive: {1, 1 + 2<var>i</var>, 1 <img src=\"images/symbol_minus.gif\"
35
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">
36
- 2<var>i</var>, 2 + <var>i</var>, 2 <img src=\"images/symbol_minus.gif\" width=\"9\"
37
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><var>i</var>,
38
- 5}.\r\n<br>\r\nThe following is a table of all of the divisors for the first five
39
- positive rational integers:</p>\r\n<table align=\"center\" border=\"1\">\n<tr>\n<td
40
- width=\"20\">\r\n<var>n</var>\n</td>\n<td> Gaussian integer divisors<br>\r\nwith
41
- positive real part</td>\n<td>Sum s(<var>n</var>) of <br>these\r\n\r\ndivisors</td>\n</tr>\n<tr>\n<td>1</td>\n<td>1</td>\n<td>1</td>\r\n</tr>\n<tr>\n<td>2</td>\n<td>1,
42
- 1+<var>i</var>, 1-<var>i</var>, 2</td>\n<td>5</td>\r\n</tr>\n<tr>\n<td>3</td>\n<td>1,
43
- 3</td>\n<td>4</td>\r\n</tr>\n<tr>\n<td>4</td>\n<td>1, 1+<var>i</var>, 1-<var>i</var>,
44
- 2, 2+2<var>i</var>, 2-2<var>i</var>,4</td>\n<td>13</td>\r\n</tr>\n<tr>\n<td>5</td>\n<td>1,
45
- 1+2<var>i</var>, 1-2<var>i</var>, 2+<var>i</var>, 2-<var>i</var>, 5</td>\n<td>12</td>\r\n</tr>\n</table>\n<p>For
46
- divisors with positive real parts, then, we have: <img src=\"project/images/p_153_formule6.gif\"
47
- border=\"0\" style=\"vertical-align:middle\" alt=\"\">.</p>\r\n<p>For 1 <img src=\"images/symbol_le.gif\"
48
- width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\"><var>n</var>
49
- <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\"
50
- style=\"vertical-align:middle;\"> 10<sup>5</sup>, <img src=\"images/symbol_sum.gif\"
51
- width=\"11\" height=\"14\" alt=\"∑\" border=\"0\" style=\"vertical-align:middle;\">
52
- s(<var>n</var>)=17924657155.</p>\r\n<p>What is <img src=\"images/symbol_sum.gif\"
53
- width=\"11\" height=\"14\" alt=\"∑\" border=\"0\" style=\"vertical-align:middle;\">
54
- s(<var>n</var>) for 1 <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\"
55
- alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\"><var>n</var> <img src=\"images/symbol_le.gif\"
56
- width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\">
57
- 10<sup>8</sup>?</p>\r\n"
5
+ :content: "As we all know the equation <var>x</var><sup>2</sup>=-1 has no solutions
6
+ for real <var>x</var>.\r \n\rIf we however introduce the imaginary number <var>i</var>
7
+ this equation has two solutions: <var>x=i</var> and <var>x=-i</var>.\r \n\rIf we
8
+ go a step further the equation (<var>x</var>-3)<sup>2</sup>=-4 has two complex solutions:
9
+ <var>x</var>=3+2<var>i</var> and <var>x</var>=3-2<var>i</var>.\r \n<var>x</var>=3+2<var>i</var>
10
+ and <var>x</var>=3-2<var>i</var> are called each others' complex conjugate.\r \n\rNumbers
11
+ of the form <var>a</var>+<var>bi</var> are called complex numbers.\r \n\rIn general
12
+ <var>a</var>+<var>bi</var> and <var>a</var> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)<var>bi</var>
13
+ are each other's complex conjugate.\n\nA Gaussian Integer is a complex number <var>a</var>+<var>bi</var>
14
+ such that both <var>a</var> and <var>b</var> are integers.\r \n\rThe regular integers
15
+ are also Gaussian integers (with <var>b</var>=0).\r \n\rTo distinguish them from
16
+ Gaussian integers with <var>b</var> ![≠](/home/will/src/euler-manager/config/../data/images/symbol_ne.gif)
17
+ 0 we call such integers \"rational integers.\"\r \n\rA Gaussian integer is called
18
+ a divisor of a rational integer <var>n</var> if the result is also a Gaussian integer.\r
19
+ \ \n\rIf for example we divide 5 by 1+2<var>i</var> we can simplify ![](/home/will/src/euler-manager/config/../data/images/p_153_formule1.gif)
20
+ in the following manner:\r \n\rMultiply numerator and denominator by the complex
21
+ conjugate of 1+2<var>i</var>: 1 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2<var>i</var>.\r
22
+ \ \n\rThe result is \r ![](/home/will/src/euler-manager/config/../data/images/p_153_formule2.gif).\r
23
+ \ \n\rSo 1+2<var>i</var> is a divisor of 5.\r \n\rNote that 1+<var>i</var> is not
24
+ a divisor of 5 because ![](/home/will/src/euler-manager/config/../data/images/p_153_formule5.gif).\r
25
+ \ \n\rNote also that if the Gaussian Integer (<var>a</var>+<var>bi</var>) is a divisor
26
+ of a rational integer <var>n</var>, then its complex conjugate (<var>a</var> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)<var>bi</var>)
27
+ is also a divisor of <var>n</var>.\n\nIn fact, 5 has six divisors such that the
28
+ real part is positive: {1, 1 + 2<var>i</var>, 1 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
29
+ 2<var>i</var>, 2 + <var>i</var>, 2 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
30
+ <var>i</var>, 5}.\r \n\rThe following is a table of all of the divisors for the
31
+ first five positive rational integers:\n\n| <var>n</var> | Gaussian integer divisors
32
+ \ \n\rwith positive real part | Sum s(<var>n</var>) of \nthese\r\rdivisors |\n|
33
+ 1 | 1 | 1 |\n| 2 | 1, 1+<var>i</var>, 1-<var>i</var>, 2 | 5 |\n| 3 | 1, 3 | 4 |\n|
34
+ 4 | 1, 1+<var>i</var>, 1-<var>i</var>, 2, 2+2<var>i</var>, 2-2<var>i</var>,4 | 13
35
+ |\n| 5 | 1, 1+2<var>i</var>, 1-2<var>i</var>, 2+<var>i</var>, 2-<var>i</var>, 5
36
+ | 12 |\n\nFor divisors with positive real parts, then, we have: ![](/home/will/src/euler-manager/config/../data/images/p_153_formule6.gif).\n\nFor
37
+ 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
38
+ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>5</sup>,
39
+ ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) s(<var>n</var>)=17924657155.\n\nWhat
40
+ is ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) s(<var>n</var>)
41
+ for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
42
+ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>8</sup>?\n\n"