euler-manager 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -2,17 +2,22 @@
2
2
  :id: 128
3
3
  :name: Hexagonal tile differences
4
4
  :url: http://projecteuler.net/problem=128
5
- :content: "\r\n\n<p>A hexagonal tile with number 1 is surrounded by a ring of six
6
- hexagonal tiles, starting at \"12 o'clock\" and numbering the tiles 2 to 7 in an
7
- anti-clockwise direction.</p>\n<p>New rings are added in the same fashion, with
8
- the next rings being numbered 8 to 19, 20 to 37, 38 to 61, and so on. The diagram
9
- below shows the first three rings.</p>\n<div style=\"text-align:center;\">\n<img
10
- src=\"project/images/p_128.gif\" width=\"400\" height=\"431\" alt=\"\">\n</div>\n<p>By
11
- finding the difference between tile <i>n</i> and each its six neighbours we shall
12
- define PD(<i>n</i>) to be the number of those differences which are prime.</p>\n<p>For
13
- example, working clockwise around tile 8 the differences are 12, 29, 11, 6, 1, and
14
- 13. So PD(8) = 3.</p>\n<p>In the same way, the differences around tile 17 are 1,
15
- 17, 16, 1, 11, and 10, hence PD(17) = 2.</p>\n<p>It can be shown that the maximum
16
- value of PD(<i>n</i>) is 3.</p>\n<p>If all of the tiles for which PD(<i>n</i>) =
17
- 3 are listed in ascending order to form a sequence, the 10th tile would be 271.</p>\n<p>Find
18
- the 2000th tile in this sequence.</p>\n\r\n"
5
+ :content: |+
6
+ A hexagonal tile with number 1 is surrounded by a ring of six hexagonal tiles, starting at "12 o'clock" and numbering the tiles 2 to 7 in an anti-clockwise direction.
7
+
8
+ New rings are added in the same fashion, with the next rings being numbered 8 to 19, 20 to 37, 38 to 61, and so on. The diagram below shows the first three rings.
9
+
10
+ ![](/home/will/src/euler-manager/config/../data/images/p_128.gif)
11
+
12
+ By finding the difference between tile _n_ and each its six neighbours we shall define PD(_n_) to be the number of those differences which are prime.
13
+
14
+ For example, working clockwise around tile 8 the differences are 12, 29, 11, 6, 1, and 13. So PD(8) = 3.
15
+
16
+ In the same way, the differences around tile 17 are 1, 17, 16, 1, 11, and 10, hence PD(17) = 2.
17
+
18
+ It can be shown that the maximum value of PD(_n_) is 3.
19
+
20
+ If all of the tiles for which PD(_n_) = 3 are listed in ascending order to form a sequence, the 10th tile would be 271.
21
+
22
+ Find the 2000th tile in this sequence.
23
+
@@ -2,11 +2,12 @@
2
2
  :id: 129
3
3
  :name: Repunit divisibility
4
4
  :url: http://projecteuler.net/problem=129
5
- :content: "\r\n\n<p>A number consisting entirely of ones is called a repunit. We shall
6
- define R(<i>k</i>) to be a repunit of length <i>k</i>; for example, R(6) = 111111.</p>\n<p>Given
7
- that <i>n</i> is a positive integer and GCD(<i>n</i>, 10) = 1, it can be shown that
8
- there always exists a value, <i>k</i>, for which R(<i>k</i>) is divisible by <i>n</i>,
9
- and let A(<i>n</i>) be the least such value of <i>k</i>; for example, A(7) = 6 and
10
- A(41) = 5.</p>\n<p>The least value of <i>n</i> for which A(<i>n</i>) first exceeds
11
- ten is 17.</p>\n<p>Find the least value of <i>n</i> for which A(<i>n</i>) first
12
- exceeds one-million.</p>\n\r\n"
5
+ :content: |+
6
+ A number consisting entirely of ones is called a repunit. We shall define R(_k_) to be a repunit of length _k_; for example, R(6) = 111111.
7
+
8
+ Given that _n_ is a positive integer and GCD(_n_, 10) = 1, it can be shown that there always exists a value, _k_, for which R(_k_) is divisible by _n_, and let A(_n_) be the least such value of _k_; for example, A(7) = 6 and A(41) = 5.
9
+
10
+ The least value of _n_ for which A(_n_) first exceeds ten is 17.
11
+
12
+ Find the least value of _n_ for which A(_n_) first exceeds one-million.
13
+
data/data/problems/13.yml CHANGED
@@ -2,5 +2,55 @@
2
2
  :id: 13
3
3
  :name: Large sum
4
4
  :url: http://projecteuler.net/problem=13
5
- :content: "\r\n\n<p>Work out the first ten digits of the sum of the following one-hundred
6
- 50-digit numbers.</p>\n<div style=\"font-family:courier new;font-size:10pt;text-align:center;\">\n37107287533902102798797998220837590246510135740250<br>\n46376937677490009712648124896970078050417018260538<br>\n74324986199524741059474233309513058123726617309629<br>\n91942213363574161572522430563301811072406154908250<br>\n23067588207539346171171980310421047513778063246676<br>\n89261670696623633820136378418383684178734361726757<br>\n28112879812849979408065481931592621691275889832738<br>\n44274228917432520321923589422876796487670272189318<br>\n47451445736001306439091167216856844588711603153276<br>\n70386486105843025439939619828917593665686757934951<br>\n62176457141856560629502157223196586755079324193331<br>\n64906352462741904929101432445813822663347944758178<br>\n92575867718337217661963751590579239728245598838407<br>\n58203565325359399008402633568948830189458628227828<br>\n80181199384826282014278194139940567587151170094390<br>\n35398664372827112653829987240784473053190104293586<br>\n86515506006295864861532075273371959191420517255829<br>\n71693888707715466499115593487603532921714970056938<br>\n54370070576826684624621495650076471787294438377604<br>\n53282654108756828443191190634694037855217779295145<br>\n36123272525000296071075082563815656710885258350721<br>\n45876576172410976447339110607218265236877223636045<br>\n17423706905851860660448207621209813287860733969412<br>\n81142660418086830619328460811191061556940512689692<br>\n51934325451728388641918047049293215058642563049483<br>\n62467221648435076201727918039944693004732956340691<br>\n15732444386908125794514089057706229429197107928209<br>\n55037687525678773091862540744969844508330393682126<br>\n18336384825330154686196124348767681297534375946515<br>\n80386287592878490201521685554828717201219257766954<br>\n78182833757993103614740356856449095527097864797581<br>\n16726320100436897842553539920931837441497806860984<br>\n48403098129077791799088218795327364475675590848030<br>\n87086987551392711854517078544161852424320693150332<br>\n59959406895756536782107074926966537676326235447210<br>\n69793950679652694742597709739166693763042633987085<br>\n41052684708299085211399427365734116182760315001271<br>\n65378607361501080857009149939512557028198746004375<br>\n35829035317434717326932123578154982629742552737307<br>\n94953759765105305946966067683156574377167401875275<br>\n88902802571733229619176668713819931811048770190271<br>\n25267680276078003013678680992525463401061632866526<br>\n36270218540497705585629946580636237993140746255962<br>\n24074486908231174977792365466257246923322810917141<br>\n91430288197103288597806669760892938638285025333403<br>\n34413065578016127815921815005561868836468420090470<br>\n23053081172816430487623791969842487255036638784583<br>\n11487696932154902810424020138335124462181441773470<br>\n63783299490636259666498587618221225225512486764533<br>\n67720186971698544312419572409913959008952310058822<br>\n95548255300263520781532296796249481641953868218774<br>\n76085327132285723110424803456124867697064507995236<br>\n37774242535411291684276865538926205024910326572967<br>\n23701913275725675285653248258265463092207058596522<br>\n29798860272258331913126375147341994889534765745501<br>\n18495701454879288984856827726077713721403798879715<br>\n38298203783031473527721580348144513491373226651381<br>\n34829543829199918180278916522431027392251122869539<br>\n40957953066405232632538044100059654939159879593635<br>\n29746152185502371307642255121183693803580388584903<br>\n41698116222072977186158236678424689157993532961922<br>\n62467957194401269043877107275048102390895523597457<br>\n23189706772547915061505504953922979530901129967519<br>\n86188088225875314529584099251203829009407770775672<br>\n11306739708304724483816533873502340845647058077308<br>\n82959174767140363198008187129011875491310547126581<br>\n97623331044818386269515456334926366572897563400500<br>\n42846280183517070527831839425882145521227251250327<br>\n55121603546981200581762165212827652751691296897789<br>\n32238195734329339946437501907836945765883352399886<br>\n75506164965184775180738168837861091527357929701337<br>\n62177842752192623401942399639168044983993173312731<br>\n32924185707147349566916674687634660915035914677504<br>\n99518671430235219628894890102423325116913619626622<br>\n73267460800591547471830798392868535206946944540724<br>\n76841822524674417161514036427982273348055556214818<br>\n97142617910342598647204516893989422179826088076852<br>\n87783646182799346313767754307809363333018982642090<br>\n10848802521674670883215120185883543223812876952786<br>\n71329612474782464538636993009049310363619763878039<br>\n62184073572399794223406235393808339651327408011116<br>\n66627891981488087797941876876144230030984490851411<br>\n60661826293682836764744779239180335110989069790714<br>\n85786944089552990653640447425576083659976645795096<br>\n66024396409905389607120198219976047599490197230297<br>\n64913982680032973156037120041377903785566085089252<br>\n16730939319872750275468906903707539413042652315011<br>\n94809377245048795150954100921645863754710598436791<br>\n78639167021187492431995700641917969777599028300699<br>\n15368713711936614952811305876380278410754449733078<br>\n40789923115535562561142322423255033685442488917353<br>\n44889911501440648020369068063960672322193204149535<br>\n41503128880339536053299340368006977710650566631954<br>\n81234880673210146739058568557934581403627822703280<br>\n82616570773948327592232845941706525094512325230608<br>\n22918802058777319719839450180888072429661980811197<br>\n77158542502016545090413245809786882778948721859617<br>\n72107838435069186155435662884062257473692284509516<br>\n20849603980134001723930671666823555245252804609722<br>\n53503534226472524250874054075591789781264330331690<br>\n</div>\n\r\n"
5
+ :content: "Work out the first ten digits of the sum of the following one-hundred 50-digit
6
+ numbers.\n\n37107287533902102798797998220837590246510135740250 \n46376937677490009712648124896970078050417018260538
7
+ \ \n74324986199524741059474233309513058123726617309629 \n91942213363574161572522430563301811072406154908250
8
+ \ \n23067588207539346171171980310421047513778063246676 \n89261670696623633820136378418383684178734361726757
9
+ \ \n28112879812849979408065481931592621691275889832738 \n44274228917432520321923589422876796487670272189318
10
+ \ \n47451445736001306439091167216856844588711603153276 \n70386486105843025439939619828917593665686757934951
11
+ \ \n62176457141856560629502157223196586755079324193331 \n64906352462741904929101432445813822663347944758178
12
+ \ \n92575867718337217661963751590579239728245598838407 \n58203565325359399008402633568948830189458628227828
13
+ \ \n80181199384826282014278194139940567587151170094390 \n35398664372827112653829987240784473053190104293586
14
+ \ \n86515506006295864861532075273371959191420517255829 \n71693888707715466499115593487603532921714970056938
15
+ \ \n54370070576826684624621495650076471787294438377604 \n53282654108756828443191190634694037855217779295145
16
+ \ \n36123272525000296071075082563815656710885258350721 \n45876576172410976447339110607218265236877223636045
17
+ \ \n17423706905851860660448207621209813287860733969412 \n81142660418086830619328460811191061556940512689692
18
+ \ \n51934325451728388641918047049293215058642563049483 \n62467221648435076201727918039944693004732956340691
19
+ \ \n15732444386908125794514089057706229429197107928209 \n55037687525678773091862540744969844508330393682126
20
+ \ \n18336384825330154686196124348767681297534375946515 \n80386287592878490201521685554828717201219257766954
21
+ \ \n78182833757993103614740356856449095527097864797581 \n16726320100436897842553539920931837441497806860984
22
+ \ \n48403098129077791799088218795327364475675590848030 \n87086987551392711854517078544161852424320693150332
23
+ \ \n59959406895756536782107074926966537676326235447210 \n69793950679652694742597709739166693763042633987085
24
+ \ \n41052684708299085211399427365734116182760315001271 \n65378607361501080857009149939512557028198746004375
25
+ \ \n35829035317434717326932123578154982629742552737307 \n94953759765105305946966067683156574377167401875275
26
+ \ \n88902802571733229619176668713819931811048770190271 \n25267680276078003013678680992525463401061632866526
27
+ \ \n36270218540497705585629946580636237993140746255962 \n24074486908231174977792365466257246923322810917141
28
+ \ \n91430288197103288597806669760892938638285025333403 \n34413065578016127815921815005561868836468420090470
29
+ \ \n23053081172816430487623791969842487255036638784583 \n11487696932154902810424020138335124462181441773470
30
+ \ \n63783299490636259666498587618221225225512486764533 \n67720186971698544312419572409913959008952310058822
31
+ \ \n95548255300263520781532296796249481641953868218774 \n76085327132285723110424803456124867697064507995236
32
+ \ \n37774242535411291684276865538926205024910326572967 \n23701913275725675285653248258265463092207058596522
33
+ \ \n29798860272258331913126375147341994889534765745501 \n18495701454879288984856827726077713721403798879715
34
+ \ \n38298203783031473527721580348144513491373226651381 \n34829543829199918180278916522431027392251122869539
35
+ \ \n40957953066405232632538044100059654939159879593635 \n29746152185502371307642255121183693803580388584903
36
+ \ \n41698116222072977186158236678424689157993532961922 \n62467957194401269043877107275048102390895523597457
37
+ \ \n23189706772547915061505504953922979530901129967519 \n86188088225875314529584099251203829009407770775672
38
+ \ \n11306739708304724483816533873502340845647058077308 \n82959174767140363198008187129011875491310547126581
39
+ \ \n97623331044818386269515456334926366572897563400500 \n42846280183517070527831839425882145521227251250327
40
+ \ \n55121603546981200581762165212827652751691296897789 \n32238195734329339946437501907836945765883352399886
41
+ \ \n75506164965184775180738168837861091527357929701337 \n62177842752192623401942399639168044983993173312731
42
+ \ \n32924185707147349566916674687634660915035914677504 \n99518671430235219628894890102423325116913619626622
43
+ \ \n73267460800591547471830798392868535206946944540724 \n76841822524674417161514036427982273348055556214818
44
+ \ \n97142617910342598647204516893989422179826088076852 \n87783646182799346313767754307809363333018982642090
45
+ \ \n10848802521674670883215120185883543223812876952786 \n71329612474782464538636993009049310363619763878039
46
+ \ \n62184073572399794223406235393808339651327408011116 \n66627891981488087797941876876144230030984490851411
47
+ \ \n60661826293682836764744779239180335110989069790714 \n85786944089552990653640447425576083659976645795096
48
+ \ \n66024396409905389607120198219976047599490197230297 \n64913982680032973156037120041377903785566085089252
49
+ \ \n16730939319872750275468906903707539413042652315011 \n94809377245048795150954100921645863754710598436791
50
+ \ \n78639167021187492431995700641917969777599028300699 \n15368713711936614952811305876380278410754449733078
51
+ \ \n40789923115535562561142322423255033685442488917353 \n44889911501440648020369068063960672322193204149535
52
+ \ \n41503128880339536053299340368006977710650566631954 \n81234880673210146739058568557934581403627822703280
53
+ \ \n82616570773948327592232845941706525094512325230608 \n22918802058777319719839450180888072429661980811197
54
+ \ \n77158542502016545090413245809786882778948721859617 \n72107838435069186155435662884062257473692284509516
55
+ \ \n20849603980134001723930671666823555245252804609722 \n53503534226472524250874054075591789781264330331690
56
+ \ \n\n"
@@ -2,18 +2,15 @@
2
2
  :id: 130
3
3
  :name: Composites with prime repunit property
4
4
  :url: http://projecteuler.net/problem=130
5
- :content: "\r\n\n<p>A number consisting entirely of ones is called a repunit. We shall
6
- define R(<i>k</i>) to be a repunit of length <i>k</i>; for example, R(6) = 111111.</p>\n<p>Given
7
- that <i>n</i> is a positive integer and GCD(<i>n</i>, 10) = 1, it can be shown that
8
- there always exists a value, <i>k</i>, for which R(<i>k</i>) is divisible by <i>n</i>,
9
- and let A(<i>n</i>) be the least such value of <i>k</i>; for example, A(7) = 6 and
10
- A(41) = 5.</p>\n<p>You are given that for all primes, <i>p</i> <img src=\"images/symbol_gt.gif\"
11
- width=\"10\" height=\"10\" alt=\"&gt;\" border=\"0\" style=\"vertical-align:middle;\">
12
- 5, that <i>p</i> <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
13
- border=\"0\" style=\"vertical-align:middle;\"> 1 is divisible by A(<i>p</i>). For
14
- example, when <i>p</i> = 41, A(41) = 5, and 40 is divisible by 5.</p>\n<p>However,
15
- there are rare composite values for which this is also true; the first five examples
16
- being 91, 259, 451, 481, and 703.</p>\n<p>Find the sum of the first twenty-five
17
- composite values of <i>n</i> for which<br>GCD(<i>n</i>, 10) = 1 and <i>n</i> <img
18
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
19
- style=\"vertical-align:middle;\"> 1 is divisible by A(<i>n</i>).</p>\n\r\n"
5
+ :content: "A number consisting entirely of ones is called a repunit. We shall define
6
+ R(_k_) to be a repunit of length _k_; for example, R(6) = 111111.\n\nGiven that
7
+ _n_ is a positive integer and GCD(_n_, 10) = 1, it can be shown that there always
8
+ exists a value, _k_, for which R(_k_) is divisible by _n_, and let A(_n_) be the
9
+ least such value of _k_; for example, A(7) = 6 and A(41) = 5.\n\nYou are given that
10
+ for all primes, _p_ ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
11
+ 5, that _p_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
12
+ 1 is divisible by A(_p_). For example, when _p_ = 41, A(41) = 5, and 40 is divisible
13
+ by 5.\n\nHowever, there are rare composite values for which this is also true; the
14
+ first five examples being 91, 259, 451, 481, and 703.\n\nFind the sum of the first
15
+ twenty-five composite values of _n_ for which \nGCD(_n_, 10) = 1 and _n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
16
+ 1 is divisible by A(_n_).\n\n"
@@ -2,11 +2,12 @@
2
2
  :id: 131
3
3
  :name: Prime cube partnership
4
4
  :url: http://projecteuler.net/problem=131
5
- :content: "\r\n<p>There are some prime values, <i>p</i>, for which there exists a
6
- positive integer, <i>n</i>, such that the expression <i>n</i><sup>3</sup> + <i>n</i><sup>2</sup><i>p</i>
7
- is a perfect cube.</p>\r\n<p>For example, when <i>p</i> = 19, 8<sup>3</sup> + 8<sup>2</sup><img
8
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
9
- style=\"vertical-align:middle;\">19 = 12<sup>3</sup>.</p>\r\n<p>What is perhaps
10
- most surprising is that for each prime with this property the value of <i>n</i>
11
- is unique, and there are only four such primes below one-hundred.</p>\r\n<p>How
12
- many primes below one million have this remarkable property?</p>\r\n\r\n"
5
+ :content: |+
6
+ There are some prime values, _p_, for which there exists a positive integer, _n_, such that the expression _n_<sup>3</sup> + _n_<sup>2</sup>_p_ is a perfect cube.
7
+
8
+ For example, when _p_ = 19, 8<sup>3</sup> + 8<sup>2</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)19 = 12<sup>3</sup>.
9
+
10
+ What is perhaps most surprising is that for each prime with this property the value of _n_ is unique, and there are only four such primes below one-hundred.
11
+
12
+ How many primes below one million have this remarkable property?
13
+
@@ -2,11 +2,10 @@
2
2
  :id: 132
3
3
  :name: Large repunit factors
4
4
  :url: http://projecteuler.net/problem=132
5
- :content: "\r\n<p>A number consisting entirely of ones is called a repunit. We shall
6
- define R(<i>k</i>) to be a repunit of length <i>k</i>.</p>\r\n<p>For example, R(10)
7
- = 1111111111 = 11<img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\"
8
- border=\"0\" style=\"vertical-align:middle;\">41<img src=\"images/symbol_times.gif\"
9
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">271<img
10
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
11
- style=\"vertical-align:middle;\">9091, and the sum of these prime factors is 9414.</p>\r\n<p>Find
12
- the sum of the first forty prime factors of R(10<sup>9</sup>).</p>\r\n\r\n"
5
+ :content: |+
6
+ A number consisting entirely of ones is called a repunit. We shall define R(_k_) to be a repunit of length _k_.
7
+
8
+ For example, R(10) = 1111111111 = 11 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)41 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)271 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)9091, and the sum of these prime factors is 9414.
9
+
10
+ Find the sum of the first forty prime factors of R(10<sup>9</sup>).
11
+
@@ -2,12 +2,12 @@
2
2
  :id: 133
3
3
  :name: Repunit nonfactors
4
4
  :url: http://projecteuler.net/problem=133
5
- :content: "\r\n<p>A number consisting entirely of ones is called a repunit. We shall
6
- define R(<var>k</var>) to be a repunit of length <var>k</var>; for example, R(6)
7
- = 111111.</p>\r\n<p>Let us consider repunits of the form R(10<sup><var>n</var></sup>).</p>\r\n<p>Although
8
- R(10), R(100), or R(1000) are not divisible by 17, R(10000) is divisible by 17.
9
- Yet there is no value of <var>n</var> for which R(10<sup><var>n</var></sup>) will
10
- divide by 19. In fact, it is remarkable that 11, 17, 41, and 73 are the only four
11
- primes below one-hundred that can <!-- ever--> be a factor of R(10<sup><var>n</var></sup>).</p>\r\n<p>Find
12
- the sum of all the primes below one-hundred thousand that will never be a factor
13
- of R(10<sup><var>n</var></sup>).</p>\r\n\r\n"
5
+ :content: |+
6
+ A number consisting entirely of ones is called a repunit. We shall define R(<var>k</var>) to be a repunit of length <var>k</var>; for example, R(6) = 111111.
7
+
8
+ Let us consider repunits of the form R(10<sup><var>n</var></sup>).
9
+
10
+ Although R(10), R(100), or R(1000) are not divisible by 17, R(10000) is divisible by 17. Yet there is no value of <var>n</var> for which R(10<sup><var>n</var></sup>) will divide by 19. In fact, it is remarkable that 11, 17, 41, and 73 are the only four primes below one-hundred that can <!-- ever--> be a factor of R(10<sup><var>n</var></sup>).
11
+
12
+ Find the sum of all the primes below one-hundred thousand that will never be a factor of R(10<sup><var>n</var></sup>).
13
+
@@ -2,18 +2,10 @@
2
2
  :id: 134
3
3
  :name: Prime pair connection
4
4
  :url: http://projecteuler.net/problem=134
5
- :content: "\r\n\n<p>Consider the consecutive primes <i>p</i><sub>1</sub> = 19 and
6
- <i>p</i><sub>2</sub> = 23. It can be verified that 1219 is the smallest number such
7
- that the last digits are formed by <i>p</i><sub>1</sub> whilst also being divisible
8
- by <i>p</i><sub>2</sub>.</p>\n<p>In fact, with the exception of <i>p</i><sub>1</sub>
9
- = 3 and <i>p</i><sub>2</sub> = 5, for every pair of consecutive primes, <i>p</i><sub>2</sub><img
10
- src=\"images/symbol_gt.gif\" width=\"10\" height=\"10\" alt=\"&gt;\" border=\"0\"
11
- style=\"vertical-align:middle;\"><i>p</i><sub>1</sub>, there exist values of <i>n</i>
12
- for which the last digits are formed by <i>p</i><sub>1</sub> and <i>n</i> is divisible
13
- by <i>p</i><sub>2</sub>. Let <i>S</i> be the smallest of these values of <i>n</i>.</p>\n<p>Find
14
- <img src=\"images/symbol_sum.gif\" width=\"11\" height=\"14\" alt=\"∑\" border=\"0\"
15
- style=\"vertical-align:middle;\"><i>S</i> for every pair of consecutive primes with
16
- 5 <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\"
17
- style=\"vertical-align:middle;\"><i>p</i><sub>1</sub><img src=\"images/symbol_le.gif\"
18
- width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\">
19
- 1000000.</p>\n\r\n"
5
+ :content: |+
6
+ Consider the consecutive primes _p_<sub>1</sub> = 19 and _p_<sub>2</sub> = 23. It can be verified that 1219 is the smallest number such that the last digits are formed by _p_<sub>1</sub> whilst also being divisible by _p_<sub>2</sub>.
7
+
8
+ In fact, with the exception of _p_<sub>1</sub> = 3 and _p_<sub>2</sub> = 5, for every pair of consecutive primes, _p_<sub>2</sub> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) _p_<sub>1</sub>, there exist values of _n_ for which the last digits are formed by _p_<sub>1</sub> and _n_ is divisible by _p_<sub>2</sub>. Let _S_ be the smallest of these values of _n_.
9
+
10
+ Find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) _S_ for every pair of consecutive primes with 5 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _p_<sub>1</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1000000.
11
+
@@ -2,19 +2,12 @@
2
2
  :id: 135
3
3
  :name: Same differences
4
4
  :url: http://projecteuler.net/problem=135
5
- :content: "\r\n<p>Given the positive integers, <i>x</i>, <i>y</i>, and <i>z</i>, are
6
- consecutive terms of an arithmetic progression, the least value of the positive
7
- integer, <i>n</i>, for which the equation, <i>x</i><sup>2</sup><img src=\"images/symbol_minus.gif\"
8
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><i>y</i><sup>2</sup><img
9
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
10
- style=\"vertical-align:middle;\"><i>z</i><sup>2</sup> = <i>n</i>, has exactly two
11
- solutions is <i>n</i> = 27:</p>\r\n<p style=\"text-align:center;\">34<sup>2</sup><img
12
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
13
- style=\"vertical-align:middle;\"> 27<sup>2</sup><img src=\"images/symbol_minus.gif\"
14
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">
15
- 20<sup>2</sup> = 12<sup>2</sup><img src=\"images/symbol_minus.gif\" width=\"9\"
16
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"> 9<sup>2</sup><img
17
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
18
- style=\"vertical-align:middle;\"> 6<sup>2</sup> = 27</p>\r\n<p>It turns out that
19
- <i>n</i> = 1155 is the least value which has exactly ten solutions.</p>\r\n<p>How
20
- many values of <i>n</i> less than one million have exactly ten distinct solutions?</p>\r\n\r\n"
5
+ :content: |+
6
+ Given the positive integers, _x_, _y_, and _z_, are consecutive terms of an arithmetic progression, the least value of the positive integer, _n_, for which the equation, _x_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _y_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _z_<sup>2</sup> = _n_, has exactly two solutions is _n_ = 27:
7
+
8
+ 34<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 27<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 20<sup>2</sup> = 12<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 9<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 6<sup>2</sup> = 27
9
+
10
+ It turns out that _n_ = 1155 is the least value which has exactly ten solutions.
11
+
12
+ How many values of _n_ less than one million have exactly ten distinct solutions?
13
+
@@ -2,16 +2,12 @@
2
2
  :id: 136
3
3
  :name: Singleton difference
4
4
  :url: http://projecteuler.net/problem=136
5
- :content: "\r\n<p>The positive integers, <i>x</i>, <i>y</i>, and <i>z</i>, are consecutive
6
- terms of an arithmetic progression. Given that <i>n</i> is a positive integer, the
7
- equation, <i>x</i><sup>2</sup><img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\"
8
- alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><i>y</i><sup>2</sup><img
9
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
10
- style=\"vertical-align:middle;\"><i>z</i><sup>2</sup> = <i>n</i>, has exactly one
11
- solution when <i>n</i> = 20:</p>\r\n<p style=\"text-align:center;\">13<sup>2</sup><img
12
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
13
- style=\"vertical-align:middle;\"> 10<sup>2</sup><img src=\"images/symbol_minus.gif\"
14
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">
15
- 7<sup>2</sup> = 20</p>\r\n<p>In fact there are twenty-five values of <i>n</i> below
16
- one hundred for which the equation has a unique solution.</p>\r\n<p>How many values
17
- of <i>n</i> less than fifty million have exactly one solution?</p>\r\n\r\n"
5
+ :content: |+
6
+ The positive integers, _x_, _y_, and _z_, are consecutive terms of an arithmetic progression. Given that _n_ is a positive integer, the equation, _x_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _y_<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) _z_<sup>2</sup> = _n_, has exactly one solution when _n_ = 20:
7
+
8
+ 13<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 10<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 7<sup>2</sup> = 20
9
+
10
+ In fact there are twenty-five values of _n_ below one hundred for which the equation has a unique solution.
11
+
12
+ How many values of _n_ less than fifty million have exactly one solution?
13
+
@@ -2,35 +2,25 @@
2
2
  :id: 137
3
3
  :name: Fibonacci golden nuggets
4
4
  :url: http://projecteuler.net/problem=137
5
- :content: "\r\n\n<p>Consider the infinite polynomial series A<sub>F</sub>(<i>x</i>)
6
- = <i>x</i>F<sub>1</sub> + <i>x</i><sup>2</sup>F<sub>2</sub> + <i>x</i><sup>3</sup>F<sub>3</sub>
7
- + ..., where F<sub><i>k</i></sub> is the <i>k</i>th term in the Fibonacci sequence:
8
- 1, 1, 2, 3, 5, 8, ... ; that is, F<sub><i>k</i></sub> = F<sub><i>k</i><img src=\"images/symbol_minus.gif\"
9
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">1</sub>
10
- + F<sub><i>k</i><img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
11
- border=\"0\" style=\"vertical-align:middle;\">2</sub>, F<sub>1</sub> = 1 and F<sub>2</sub>
12
- = 1.</p>\n<p>For this problem we shall be interested in values of <i>x</i> for which
13
- A<sub>F</sub>(<i>x</i>) is a positive integer.</p>\n<table cellpadding=\"0\" cellspacing=\"0\"
14
- border=\"0\">\n<tr>\n<td>Surprisingly A<sub>F</sub>(1/2)</td>\n<td> = </td>\n<td>(1/2).1
15
- + (1/2)<sup>2</sup>.1 + (1/2)<sup>3</sup>.2 + (1/2)<sup>4</sup>.3 + (1/2)<sup>5</sup>.5
16
- + ...</td>\n</tr>\n<tr>\n<td> </td>\n<td> = </td>\n<td>1/2 + 1/4 + 2/8 + 3/16 +
17
- 5/32 + ...</td>\n</tr>\n<tr>\n<td> </td>\n<td> = </td>\n<td>2</td>\n</tr>\n</table>\n<p>The
18
- corresponding values of <i>x</i> for the first five natural numbers are shown below.</p>\n<div
19
- style=\"text-align:center;\">\n<table cellspacing=\"0\" cellpadding=\"2\" border=\"1\"
20
- align=\"center\">\n<tr style=\"background-color:#c1daf9;\">\n<td><b><i>x</i></b></td>\n<td
21
- width=\"50\"><b>A<sub>F</sub>(<i>x</i>)</b></td>\n</tr>\n<tr>\n<td>\n<img src=\"images/symbol_radic.gif\"
22
- width=\"14\" height=\"16\" alt=\"√\" border=\"0\" style=\"vertical-align:middle;\">2<img
23
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
24
- style=\"vertical-align:middle;\">1</td>\n<td>1</td>\n</tr>\n<tr>\n<td>1/2</td>\n<td>2</td>\n</tr>\n<tr>\n<td>(<img
25
- src=\"images/symbol_radic.gif\" width=\"14\" height=\"16\" alt=\"√\" border=\"0\"
26
- style=\"vertical-align:middle;\">13<img src=\"images/symbol_minus.gif\" width=\"9\"
27
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2)/3</td>\n<td>3</td>\n</tr>\n<tr>\n<td>(<img
28
- src=\"images/symbol_radic.gif\" width=\"14\" height=\"16\" alt=\"√\" border=\"0\"
29
- style=\"vertical-align:middle;\">89<img src=\"images/symbol_minus.gif\" width=\"9\"
30
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">5)/8</td>\n<td>4</td>\n</tr>\n<tr>\n<td>(<img
31
- src=\"images/symbol_radic.gif\" width=\"14\" height=\"16\" alt=\"√\" border=\"0\"
32
- style=\"vertical-align:middle;\">34<img src=\"images/symbol_minus.gif\" width=\"9\"
33
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">3)/5</td>\n<td>5</td>\n</tr>\n</table>\n</div>\n<p>We
34
- shall call A<sub>F</sub>(<i>x</i>) a golden nugget if <i>x</i> is rational, because
35
- they become increasingly rarer; for example, the 10th golden nugget is 74049690.</p>\n<p>Find
36
- the 15th golden nugget.</p>\n\r\n"
5
+ :content: |+
6
+ Consider the infinite polynomial series A<sub>F</sub>(_x_) = _x_F<sub>1</sub> + _x_<sup>2</sup>F<sub>2</sub> + _x_<sup>3</sup>F<sub>3</sub> + ..., where F<sub><i>k</i></sub> is the _k_th term in the Fibonacci sequence: 1, 1, 2, 3, 5, 8, ... ; that is, F<sub><i>k</i></sub> = F<sub><i>k</i><img src="%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif" width="9" height="3" alt="−" border="0" style="vertical-align:middle;">1</sub> + F<sub><i>k</i><img src="%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif" width="9" height="3" alt="−" border="0" style="vertical-align:middle;">2</sub>, F<sub>1</sub> = 1 and F<sub>2</sub> = 1.
7
+
8
+ For this problem we shall be interested in values of _x_ for which A<sub>F</sub>(_x_) is a positive integer.
9
+
10
+ | Surprisingly A<sub>F</sub>(1/2) |  =  | (1/2).1 + (1/2)<sup>2</sup>.1 + (1/2)<sup>3</sup>.2 + (1/2)<sup>4</sup>.3 + (1/2)<sup>5</sup>.5 + ... |
11
+ |   |  =  | 1/2 + 1/4 + 2/8 + 3/16 + 5/32 + ... |
12
+ |   |  =  | 2 |
13
+
14
+ The corresponding values of _x_ for the first five natural numbers are shown below.
15
+
16
+ | **_x_** | **A<sub>F</sub>(_x_)** |
17
+ | ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1 | 1 |
18
+ | 1/2 | 2 |
19
+ | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)13 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2)/3 | 3 |
20
+ | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)89 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)5)/8 | 4 |
21
+ | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)34 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)3)/5 | 5 |
22
+
23
+ We shall call A<sub>F</sub>(_x_) a golden nugget if _x_ is rational, because they become increasingly rarer; for example, the 10th golden nugget is 74049690.
24
+
25
+ Find the 15th golden nugget.
26
+
@@ -2,19 +2,14 @@
2
2
  :id: 138
3
3
  :name: Special isosceles triangles
4
4
  :url: http://projecteuler.net/problem=138
5
- :content: "\r\n<p>Consider the isosceles triangle with base length, <i>b</i> = 16,
6
- and legs, L = 17.</p>\r\n<div style=\"text-align:center;\">\r\n<img src=\"project/images/p_138.gif\"
7
- width=\"230\" height=\"228\" alt=\"\">\n</div>\r\n<p>By using the Pythagorean theorem
8
- it can be seen that the height of the triangle, <i>h</i> = <img src=\"images/symbol_radic.gif\"
9
- width=\"14\" height=\"16\" alt=\"√\" border=\"0\" style=\"vertical-align:middle;\">(17<sup>2</sup><img
10
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
11
- style=\"vertical-align:middle;\"> 8<sup>2</sup>) = 15, which is one less than the
12
- base length.</p>\r\n<p>With <i>b</i> = 272 and L = 305, we get <i>h</i> = 273, which
13
- is one more than the base length, and this is the second smallest isosceles triangle
14
- with the property that <i>h</i> = <i>b</i> <img src=\"images/symbol_plusmn.gif\"
15
- width=\"11\" height=\"11\" alt=\"±\" border=\"0\" style=\"vertical-align:middle;\">
16
- 1.</p>\r\n<p>Find <img src=\"images/symbol_sum.gif\" width=\"11\" height=\"14\"
17
- alt=\"∑\" border=\"0\" style=\"vertical-align:middle;\"> L for the twelve smallest
18
- isosceles triangles for which <i>h</i> = <i>b</i> <img src=\"images/symbol_plusmn.gif\"
19
- width=\"11\" height=\"11\" alt=\"±\" border=\"0\" style=\"vertical-align:middle;\">
20
- 1 and <i>b</i>, L are positive integers.</p>\r\n\r\n"
5
+ :content: |+
6
+ Consider the isosceles triangle with base length, _b_ = 16, and legs, L = 17.
7
+
8
+ ![](/home/will/src/euler-manager/config/../data/images/p_138.gif)
9
+
10
+ By using the Pythagorean theorem it can be seen that the height of the triangle, _h_ = ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)(17<sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 8<sup>2</sup>) = 15, which is one less than the base length.
11
+
12
+ With _b_ = 272 and L = 305, we get _h_ = 273, which is one more than the base length, and this is the second smallest isosceles triangle with the property that _h_ = _b_ ![±](/home/will/src/euler-manager/config/../data/images/symbol_plusmn.gif) 1.
13
+
14
+ Find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) L for the twelve smallest isosceles triangles for which _h_ = _b_ ![±](/home/will/src/euler-manager/config/../data/images/symbol_plusmn.gif) 1 and _b_, L are positive integers.
15
+
@@ -2,14 +2,14 @@
2
2
  :id: 139
3
3
  :name: Pythagorean tiles
4
4
  :url: http://projecteuler.net/problem=139
5
- :content: "\r\n<p>Let (<i>a</i>, <i>b</i>, <i>c</i>) represent the three sides of
6
- a right angle triangle with integral length sides. It is possible to place four
7
- such triangles together to form a square with length <i>c</i>.</p>\r\n<p>For example,
8
- (3, 4, 5) triangles can be placed together to form a 5 by 5 square with a 1 by 1
9
- hole in the middle and it can be seen that the 5 by 5 square can be tiled with twenty-five
10
- 1 by 1 squares.</p>\r\n<div style=\"text-align:center;\">\r\n<img src=\"project/images/p_139.gif\"
11
- width=\"400\" height=\"180\" alt=\"\">\n</div>\r\n<p>However, if (5, 12, 13) triangles
12
- were used then the hole would measure 7 by 7 and these could not be used to tile
13
- the 13 by 13 square.</p>\r\n<p>Given that the perimeter of the right triangle is
14
- less than one-hundred million, how many Pythagorean triangles would allow such a
15
- tiling to take place?</p>\r\n\r\n"
5
+ :content: |+
6
+ Let (_a_, _b_, _c_) represent the three sides of a right angle triangle with integral length sides. It is possible to place four such triangles together to form a square with length _c_.
7
+
8
+ For example, (3, 4, 5) triangles can be placed together to form a 5 by 5 square with a 1 by 1 hole in the middle and it can be seen that the 5 by 5 square can be tiled with twenty-five 1 by 1 squares.
9
+
10
+ ![](/home/will/src/euler-manager/config/../data/images/p_139.gif)
11
+
12
+ However, if (5, 12, 13) triangles were used then the hole would measure 7 by 7 and these could not be used to tile the 13 by 13 square.
13
+
14
+ Given that the perimeter of the right triangle is less than one-hundred million, how many Pythagorean triangles would allow such a tiling to take place?
15
+
data/data/problems/14.yml CHANGED
@@ -2,27 +2,17 @@
2
2
  :id: 14
3
3
  :name: Longest Collatz sequence
4
4
  :url: http://projecteuler.net/problem=14
5
- :content: "\r\n<p>The following iterative sequence is defined for the set of positive
6
- integers:</p>\r\n<p style=\"margin-left:50px;\"><var>n</var> <img src=\"images/symbol_maps.gif\"
7
- width=\"15\" height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\"><var>n</var>/2
8
- (<var>n</var> is even)<br><var>n</var> <img src=\"images/symbol_maps.gif\" width=\"15\"
9
- height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\"> 3<var>n</var>
10
- + 1 (<var>n</var> is odd)</p>\r\n<p>Using the rule above and starting with 13, we
11
- generate the following sequence:</p>\r\n<div style=\"text-align:center;\">13 <img
12
- src=\"images/symbol_maps.gif\" width=\"15\" height=\"7\" alt=\"→\" border=\"0\"
13
- style=\"vertical-align:middle;\"> 40 <img src=\"images/symbol_maps.gif\" width=\"15\"
14
- height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\"> 20 <img src=\"images/symbol_maps.gif\"
15
- width=\"15\" height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\">
16
- 10 <img src=\"images/symbol_maps.gif\" width=\"15\" height=\"7\" alt=\"→\" border=\"0\"
17
- style=\"vertical-align:middle;\"> 5 <img src=\"images/symbol_maps.gif\" width=\"15\"
18
- height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\"> 16 <img src=\"images/symbol_maps.gif\"
19
- width=\"15\" height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\">
20
- 8 <img src=\"images/symbol_maps.gif\" width=\"15\" height=\"7\" alt=\"→\" border=\"0\"
21
- style=\"vertical-align:middle;\"> 4 <img src=\"images/symbol_maps.gif\" width=\"15\"
22
- height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\"> 2 <img src=\"images/symbol_maps.gif\"
23
- width=\"15\" height=\"7\" alt=\"→\" border=\"0\" style=\"vertical-align:middle;\">
24
- 1</div>\r\n<p>It can be seen that this sequence (starting at 13 and finishing at
25
- 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it
26
- is thought that all starting numbers finish at 1.</p>\r\n<p>Which starting number,
27
- under one million, produces the longest chain?</p>\r\n<p class=\"note\"><b>NOTE:</b>
28
- Once the chain starts the terms are allowed to go above one million.</p>\r\n\r\n"
5
+ :content: "The following iterative sequence is defined for the set of positive integers:\n\n<var>n</var>
6
+ ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) <var>n</var>/2
7
+ (<var>n</var> is even) \n<var>n</var> ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
8
+ 3<var>n</var> + 1 (<var>n</var> is odd)\n\nUsing the rule above and starting with
9
+ 13, we generate the following sequence:\n\n13 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
10
+ 40 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 20 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
11
+ 10 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 5 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
12
+ 16 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 8 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
13
+ 4 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif) 2 ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
14
+ 1\n\nIt can be seen that this sequence (starting at 13 and finishing at 1) contains
15
+ 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that
16
+ all starting numbers finish at 1.\n\nWhich starting number, under one million, produces
17
+ the longest chain?\n\n**NOTE:** Once the chain starts the terms are allowed to go
18
+ above one million.\n\n"
@@ -2,28 +2,21 @@
2
2
  :id: 140
3
3
  :name: Modified Fibonacci golden nuggets
4
4
  :url: http://projecteuler.net/problem=140
5
- :content: "\r\n<p>Consider the infinite polynomial series A<sub>G</sub>(<i>x</i>)
6
- = <i>x</i>G<sub>1</sub> + <i>x</i><sup>2</sup>G<sub>2</sub> + <i>x</i><sup>3</sup>G<sub>3</sub>
7
- + ..., where G<sub><i>k</i></sub> is the <i>k</i>th term of the second order recurrence
8
- relation G<sub><i>k</i></sub> = G<sub><i>k</i><img src=\"images/symbol_minus.gif\"
9
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">1</sub>
10
- + G<sub><i>k</i><img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
11
- border=\"0\" style=\"vertical-align:middle;\">2</sub>, G<sub>1</sub> = 1 and G<sub>2</sub>
12
- = 4; that is, 1, 4, 5, 9, 14, 23, ... .</p>\r\n<p>For this problem we shall be concerned
13
- with values of <i>x</i> for which A<sub>G</sub>(<i>x</i>) is a positive integer.</p>\r\n<p>The
14
- corresponding values of <i>x</i> for the first five natural numbers are shown below.</p>\r\n<div
15
- style=\"text-align:center;\">\r\n<table cellspacing=\"0\" cellpadding=\"2\" border=\"1\"
16
- align=\"center\">\n<tr style=\"background-color:#c1daf9;\">\n<td><b><i>x</i></b></td>\n<td
17
- width=\"50\"><b>A<sub>G</sub>(<i>x</i>)</b></td>\r\n</tr>\n<tr>\n<td>(<img src=\"images/symbol_radic.gif\"
18
- width=\"14\" height=\"16\" alt=\"√\" border=\"0\" style=\"vertical-align:middle;\">5<img
19
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
20
- style=\"vertical-align:middle;\">1)/4</td>\n<td>1</td>\r\n</tr>\n<tr>\n<td>2/5</td>\n<td>2</td>\r\n</tr>\n<tr>\n<td>(<img
21
- src=\"images/symbol_radic.gif\" width=\"14\" height=\"16\" alt=\"√\" border=\"0\"
22
- style=\"vertical-align:middle;\">22<img src=\"images/symbol_minus.gif\" width=\"9\"
23
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2)/6</td>\n<td>3</td>\r\n</tr>\n<tr>\n<td>(<img
24
- src=\"images/symbol_radic.gif\" width=\"14\" height=\"16\" alt=\"√\" border=\"0\"
25
- style=\"vertical-align:middle;\">137<img src=\"images/symbol_minus.gif\" width=\"9\"
26
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">5)/14</td>\n<td>4</td>\r\n</tr>\n<tr>\n<td>1/2</td>\n<td>5</td>\r\n</tr>\n</table>\n</div>\r\n<p>We
27
- shall call A<sub>G</sub>(<i>x</i>) a golden nugget if <i>x</i> is rational, because
28
- they become increasingly rarer; for example, the 20th golden nugget is 211345365.</p>\r\n<p>Find
29
- the sum of the first thirty golden nuggets.</p>\r\n\r\n"
5
+ :content: |+
6
+ Consider the infinite polynomial series A<sub>G</sub>(_x_) = _x_G<sub>1</sub> + _x_<sup>2</sup>G<sub>2</sub> + _x_<sup>3</sup>G<sub>3</sub> + ..., where G<sub><i>k</i></sub> is the _k_th term of the second order recurrence relation G<sub><i>k</i></sub> = G<sub><i>k</i><img src="%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif" width="9" height="3" alt="−" border="0" style="vertical-align:middle;">1</sub> + G<sub><i>k</i><img src="%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif" width="9" height="3" alt="−" border="0" style="vertical-align:middle;">2</sub>, G<sub>1</sub> = 1 and G<sub>2</sub> = 4; that is, 1, 4, 5, 9, 14, 23, ... .
7
+
8
+ For this problem we shall be concerned with values of _x_ for which A<sub>G</sub>(_x_) is a positive integer.
9
+
10
+ The corresponding values of _x_ for the first five natural numbers are shown below.
11
+
12
+ | **_x_** | **A<sub>G</sub>(_x_)** |
13
+ | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)5 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1)/4 | 1 |
14
+ | 2/5 | 2 |
15
+ | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)22 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2)/6 | 3 |
16
+ | ( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)137 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)5)/14 | 4 |
17
+ | 1/2 | 5 |
18
+
19
+ We shall call A<sub>G</sub>(_x_) a golden nugget if _x_ is rational, because they become increasingly rarer; for example, the 20th golden nugget is 211345365.
20
+
21
+ Find the sum of the first thirty golden nuggets.
22
+