euler-manager 0.0.6 → 0.1.0

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 (303) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/data/images/sod_13.gif +4 -0
  4. data/data/problems/100.yml +1 -1
  5. data/data/problems/101.yml +16 -16
  6. data/data/problems/102.yml +2 -3
  7. data/data/problems/103.yml +16 -16
  8. data/data/problems/105.yml +2 -2
  9. data/data/problems/106.yml +2 -2
  10. data/data/problems/107.yml +15 -15
  11. data/data/problems/108.yml +13 -16
  12. data/data/problems/109.yml +16 -17
  13. data/data/problems/11.yml +22 -23
  14. data/data/problems/110.yml +9 -10
  15. data/data/problems/114.yml +30 -41
  16. data/data/problems/116.yml +19 -25
  17. data/data/problems/117.yml +24 -33
  18. data/data/problems/120.yml +3 -3
  19. data/data/problems/122.yml +18 -20
  20. data/data/problems/123.yml +2 -2
  21. data/data/problems/124.yml +18 -23
  22. data/data/problems/126.yml +10 -11
  23. data/data/problems/127.yml +7 -7
  24. data/data/problems/128.yml +1 -1
  25. data/data/problems/130.yml +6 -7
  26. data/data/problems/131.yml +1 -1
  27. data/data/problems/132.yml +1 -1
  28. data/data/problems/134.yml +2 -2
  29. data/data/problems/135.yml +2 -2
  30. data/data/problems/136.yml +2 -2
  31. data/data/problems/137.yml +4 -4
  32. data/data/problems/138.yml +4 -4
  33. data/data/problems/139.yml +1 -1
  34. data/data/problems/14.yml +12 -13
  35. data/data/problems/140.yml +3 -3
  36. data/data/problems/142.yml +1 -1
  37. data/data/problems/143.yml +2 -2
  38. data/data/problems/144.yml +3 -3
  39. data/data/problems/147.yml +1 -1
  40. data/data/problems/149.yml +11 -13
  41. data/data/problems/15.yml +3 -3
  42. data/data/problems/150.yml +8 -8
  43. data/data/problems/151.yml +1 -1
  44. data/data/problems/152.yml +1 -1
  45. data/data/problems/153.yml +24 -26
  46. data/data/problems/154.yml +10 -9
  47. data/data/problems/155.yml +3 -3
  48. data/data/problems/156.yml +7 -8
  49. data/data/problems/157.yml +3 -4
  50. data/data/problems/158.yml +4 -5
  51. data/data/problems/159.yml +3 -3
  52. data/data/problems/161.yml +5 -4
  53. data/data/problems/163.yml +10 -10
  54. data/data/problems/165.yml +1 -1
  55. data/data/problems/166.yml +7 -7
  56. data/data/problems/167.yml +3 -4
  57. data/data/problems/168.yml +5 -5
  58. data/data/problems/170.yml +2 -2
  59. data/data/problems/171.yml +3 -3
  60. data/data/problems/173.yml +1 -1
  61. data/data/problems/174.yml +3 -3
  62. data/data/problems/175.yml +4 -4
  63. data/data/problems/177.yml +1 -1
  64. data/data/problems/179.yml +1 -1
  65. data/data/problems/180.yml +8 -9
  66. data/data/problems/182.yml +22 -24
  67. data/data/problems/183.yml +14 -15
  68. data/data/problems/184.yml +2 -2
  69. data/data/problems/186.yml +10 -11
  70. data/data/problems/187.yml +6 -8
  71. data/data/problems/189.yml +10 -9
  72. data/data/problems/190.yml +1 -1
  73. data/data/problems/192.yml +11 -12
  74. data/data/problems/194.yml +8 -8
  75. data/data/problems/195.yml +2 -2
  76. data/data/problems/197.yml +5 -6
  77. data/data/problems/198.yml +11 -12
  78. data/data/problems/199.yml +7 -7
  79. data/data/problems/20.yml +8 -10
  80. data/data/problems/202.yml +1 -1
  81. data/data/problems/207.yml +4 -4
  82. data/data/problems/208.yml +4 -5
  83. data/data/problems/21.yml +5 -6
  84. data/data/problems/210.yml +4 -5
  85. data/data/problems/211.yml +1 -1
  86. data/data/problems/212.yml +22 -26
  87. data/data/problems/213.yml +5 -6
  88. data/data/problems/214.yml +8 -9
  89. data/data/problems/215.yml +4 -4
  90. data/data/problems/216.yml +5 -5
  91. data/data/problems/217.yml +8 -10
  92. data/data/problems/218.yml +1 -1
  93. data/data/problems/22.yml +1 -1
  94. data/data/problems/220.yml +15 -15
  95. data/data/problems/221.yml +4 -5
  96. data/data/problems/223.yml +5 -6
  97. data/data/problems/224.yml +5 -6
  98. data/data/problems/226.yml +8 -8
  99. data/data/problems/228.yml +4 -5
  100. data/data/problems/229.yml +16 -16
  101. data/data/problems/230.yml +4 -4
  102. data/data/problems/231.yml +4 -5
  103. data/data/problems/233.yml +1 -1
  104. data/data/problems/234.yml +9 -10
  105. data/data/problems/236.yml +4 -4
  106. data/data/problems/237.yml +3 -3
  107. data/data/problems/238.yml +3 -4
  108. data/data/problems/241.yml +4 -4
  109. data/data/problems/242.yml +2 -2
  110. data/data/problems/243.yml +12 -12
  111. data/data/problems/244.yml +10 -11
  112. data/data/problems/245.yml +14 -15
  113. data/data/problems/246.yml +10 -9
  114. data/data/problems/247.yml +12 -13
  115. data/data/problems/251.yml +3 -3
  116. data/data/problems/252.yml +6 -7
  117. data/data/problems/254.yml +2 -2
  118. data/data/problems/255.yml +35 -36
  119. data/data/problems/256.yml +16 -20
  120. data/data/problems/257.yml +9 -9
  121. data/data/problems/258.yml +5 -6
  122. data/data/problems/26.yml +1 -1
  123. data/data/problems/260.yml +6 -8
  124. data/data/problems/261.yml +6 -7
  125. data/data/problems/262.yml +1 -1
  126. data/data/problems/264.yml +10 -11
  127. data/data/problems/265.yml +1 -1
  128. data/data/problems/27.yml +10 -11
  129. data/data/problems/270.yml +3 -3
  130. data/data/problems/271.yml +5 -6
  131. data/data/problems/272.yml +6 -7
  132. data/data/problems/273.yml +3 -3
  133. data/data/problems/274.yml +15 -15
  134. data/data/problems/275.yml +3 -3
  135. data/data/problems/276.yml +3 -3
  136. data/data/problems/277.yml +3 -3
  137. data/data/problems/278.yml +15 -17
  138. data/data/problems/281.yml +4 -4
  139. data/data/problems/282.yml +2 -2
  140. data/data/problems/284.yml +7 -8
  141. data/data/problems/287.yml +18 -17
  142. data/data/problems/288.yml +1 -1
  143. data/data/problems/289.yml +1 -1
  144. data/data/problems/29.yml +12 -13
  145. data/data/problems/290.yml +1 -1
  146. data/data/problems/291.yml +3 -3
  147. data/data/problems/292.yml +1 -1
  148. data/data/problems/293.yml +7 -7
  149. data/data/problems/295.yml +8 -8
  150. data/data/problems/296.yml +4 -5
  151. data/data/problems/297.yml +4 -5
  152. data/data/problems/299.yml +11 -12
  153. data/data/problems/300.yml +10 -9
  154. data/data/problems/301.yml +2 -2
  155. data/data/problems/303.yml +3 -3
  156. data/data/problems/304.yml +6 -7
  157. data/data/problems/305.yml +3 -2
  158. data/data/problems/306.yml +8 -11
  159. data/data/problems/307.yml +2 -3
  160. data/data/problems/309.yml +8 -8
  161. data/data/problems/31.yml +1 -1
  162. data/data/problems/310.yml +6 -7
  163. data/data/problems/311.yml +11 -11
  164. data/data/problems/312.yml +5 -5
  165. data/data/problems/313.yml +4 -4
  166. data/data/problems/314.yml +4 -5
  167. data/data/problems/315.yml +26 -27
  168. data/data/problems/316.yml +2 -4
  169. data/data/problems/318.yml +27 -34
  170. data/data/problems/319.yml +11 -12
  171. data/data/problems/32.yml +1 -1
  172. data/data/problems/320.yml +1 -1
  173. data/data/problems/321.yml +3 -3
  174. data/data/problems/322.yml +4 -4
  175. data/data/problems/323.yml +7 -8
  176. data/data/problems/324.yml +8 -9
  177. data/data/problems/325.yml +1 -1
  178. data/data/problems/326.yml +2 -2
  179. data/data/problems/327.yml +27 -29
  180. data/data/problems/328.yml +2 -2
  181. data/data/problems/330.yml +13 -14
  182. data/data/problems/331.yml +12 -12
  183. data/data/problems/332.yml +10 -9
  184. data/data/problems/333.yml +15 -16
  185. data/data/problems/334.yml +14 -14
  186. data/data/problems/335.yml +2 -2
  187. data/data/problems/336.yml +5 -4
  188. data/data/problems/337.yml +7 -7
  189. data/data/problems/338.yml +21 -24
  190. data/data/problems/340.yml +6 -7
  191. data/data/problems/341.yml +3 -5
  192. data/data/problems/342.yml +6 -7
  193. data/data/problems/343.yml +8 -12
  194. data/data/problems/344.yml +1 -1
  195. data/data/problems/347.yml +8 -8
  196. data/data/problems/350.yml +5 -5
  197. data/data/problems/351.yml +1 -1
  198. data/data/problems/352.yml +25 -26
  199. data/data/problems/353.yml +1 -1
  200. data/data/problems/354.yml +6 -6
  201. data/data/problems/356.yml +2 -3
  202. data/data/problems/358.yml +13 -14
  203. data/data/problems/359.yml +1 -1
  204. data/data/problems/361.yml +2 -1
  205. data/data/problems/362.yml +11 -13
  206. data/data/problems/363.yml +6 -6
  207. data/data/problems/364.yml +3 -3
  208. data/data/problems/365.yml +2 -2
  209. data/data/problems/366.yml +4 -5
  210. data/data/problems/369.yml +1 -1
  211. data/data/problems/370.yml +3 -3
  212. data/data/problems/372.yml +6 -8
  213. data/data/problems/374.yml +5 -7
  214. data/data/problems/375.yml +5 -6
  215. data/data/problems/377.yml +2 -2
  216. data/data/problems/378.yml +2 -2
  217. data/data/problems/379.yml +7 -8
  218. data/data/problems/38.yml +9 -9
  219. data/data/problems/380.yml +12 -15
  220. data/data/problems/381.yml +8 -11
  221. data/data/problems/382.yml +6 -6
  222. data/data/problems/383.yml +4 -4
  223. data/data/problems/384.yml +7 -8
  224. data/data/problems/385.yml +8 -8
  225. data/data/problems/386.yml +2 -2
  226. data/data/problems/388.yml +5 -6
  227. data/data/problems/39.yml +1 -1
  228. data/data/problems/390.yml +4 -6
  229. data/data/problems/391.yml +11 -12
  230. data/data/problems/392.yml +1 -1
  231. data/data/problems/393.yml +2 -2
  232. data/data/problems/394.yml +6 -7
  233. data/data/problems/395.yml +5 -5
  234. data/data/problems/396.yml +15 -17
  235. data/data/problems/397.yml +5 -8
  236. data/data/problems/4.yml +1 -1
  237. data/data/problems/40.yml +1 -1
  238. data/data/problems/400.yml +5 -6
  239. data/data/problems/401.yml +2 -2
  240. data/data/problems/402.yml +7 -8
  241. data/data/problems/403.yml +9 -10
  242. data/data/problems/404.yml +5 -6
  243. data/data/problems/405.yml +7 -7
  244. data/data/problems/406.yml +8 -10
  245. data/data/problems/407.yml +9 -9
  246. data/data/problems/410.yml +5 -6
  247. data/data/problems/411.yml +11 -12
  248. data/data/problems/412.yml +9 -9
  249. data/data/problems/414.yml +13 -15
  250. data/data/problems/415.yml +2 -2
  251. data/data/problems/417.yml +4 -5
  252. data/data/problems/418.yml +7 -8
  253. data/data/problems/419.yml +8 -8
  254. data/data/problems/420.yml +5 -5
  255. data/data/problems/421.yml +11 -12
  256. data/data/problems/422.yml +9 -9
  257. data/data/problems/423.yml +5 -7
  258. data/data/problems/424.yml +8 -9
  259. data/data/problems/425.yml +2 -3
  260. data/data/problems/426.yml +3 -3
  261. data/data/problems/427.yml +8 -8
  262. data/data/problems/428.yml +16 -19
  263. data/data/problems/430.yml +4 -5
  264. data/data/problems/44.yml +3 -3
  265. data/data/problems/45.yml +2 -2
  266. data/data/problems/46.yml +8 -8
  267. data/data/problems/47.yml +6 -10
  268. data/data/problems/53.yml +8 -9
  269. data/data/problems/56.yml +1 -1
  270. data/data/problems/57.yml +5 -5
  271. data/data/problems/58.yml +1 -1
  272. data/data/problems/6.yml +1 -1
  273. data/data/problems/61.yml +4 -4
  274. data/data/problems/64.yml +39 -46
  275. data/data/problems/65.yml +13 -14
  276. data/data/problems/66.yml +10 -10
  277. data/data/problems/68.yml +4 -5
  278. data/data/problems/69.yml +2 -2
  279. data/data/problems/70.yml +3 -4
  280. data/data/problems/71.yml +3 -3
  281. data/data/problems/72.yml +3 -3
  282. data/data/problems/73.yml +3 -3
  283. data/data/problems/74.yml +15 -22
  284. data/data/problems/75.yml +1 -1
  285. data/data/problems/8.yml +14 -14
  286. data/data/problems/81.yml +7 -7
  287. data/data/problems/82.yml +4 -4
  288. data/data/problems/83.yml +4 -4
  289. data/data/problems/85.yml +1 -1
  290. data/data/problems/86.yml +8 -8
  291. data/data/problems/88.yml +22 -27
  292. data/data/problems/9.yml +6 -6
  293. data/data/problems/90.yml +13 -13
  294. data/data/problems/91.yml +8 -8
  295. data/data/problems/92.yml +7 -9
  296. data/data/problems/93.yml +9 -10
  297. data/data/problems/95.yml +1 -1
  298. data/data/problems/96.yml +17 -17
  299. data/data/problems/97.yml +2 -2
  300. data/data/problems/99.yml +2 -2
  301. data/lib/euler/problem.rb +6 -1
  302. data/lib/euler/version.rb +1 -1
  303. metadata +2 -2
@@ -3,24 +3,25 @@
3
3
  :name: Quadtree encoding (a simple compression algorithm)
4
4
  :url: http://projecteuler.net/problem=287
5
5
  :content: "The quadtree encoding allows us to describe a 2<sup><var>N</var></sup>
6
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2<sup><var>N</var></sup>
7
- black and white image as a sequence of bits (0 and 1). Those sequences are to be
8
- read from left to right like this:\n\n- the first bit deals with the complete 2<sup><var>N</var></sup>
9
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2<sup><var>N</var></sup>
10
- region;\n- \"0\" denotes a split:\r \nthe current 2<sup><var>n</var></sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2<sup><var>n</var></sup>
11
- region is divided into 4 sub-regions of dimension 2<sup><var>n</var>-1</sup> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2<sup><var>n</var>-1</sup>,
12
- \ \n\rthe next bits contains the description of the top left, top right, bottom
13
- left and bottom right sub-regions - in that order;\n- \"10\" indicates that the
14
- current region contains only black pixels;\n- \"11\" indicates that the current
15
- region contains only white pixels.\n\nConsider the following 4 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)4
16
- image (colored marks denote places where a split can occur):\n\n ![](/home/will/src/euler-manager/config/../data/images/p_287_quadtree.gif)\n\nThis
6
+ ![×]({{ images_dir }}/symbol_times.gif)2<sup><var>N</var></sup> black and white
7
+ image as a sequence of bits (0 and 1). Those sequences are to be read from left
8
+ to right like this:\n\n- the first bit deals with the complete 2<sup><var>N</var></sup>
9
+ ![×]({{ images_dir }}/symbol_times.gif)2<sup><var>N</var></sup> region;\n- \"0\"
10
+ denotes a split:\r \nthe current 2<sup><var>n</var></sup> ![×]({{ images_dir }}/symbol_times.gif)2<sup><var>n</var></sup>
11
+ region is divided into 4 sub-regions of dimension 2<sup><var>n</var>-1</sup> ![×]({{
12
+ images_dir }}/symbol_times.gif)2<sup><var>n</var>-1</sup>, \n\rthe next bits contains
13
+ the description of the top left, top right, bottom left and bottom right sub-regions
14
+ - in that order;\n- \"10\" indicates that the current region contains only black
15
+ pixels;\n- \"11\" indicates that the current region contains only white pixels.\n\nConsider
16
+ the following 4 ![×]({{ images_dir }}/symbol_times.gif)4 image (colored marks denote
17
+ places where a split can occur):\n\n ![]({{ images_dir }}/p_287_quadtree.gif)\n\nThis
17
18
  image can be described by several sequences, for example :<bp></bp>\r\" **0****
18
19
  0 **10101010** 0 **1011111011** 0**10101010\", of length 30, or \n\r\" **0** 10
19
20
  **0** 101111101110\", of length 16, which is the minimal sequence for this image.\n\nFor
20
21
  a positive integer <var>N</var>, define <var>D<sub>N</sub></var> as the 2<sup><var>N</var></sup>
21
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2<sup><var>N</var></sup>
22
- image with the following coloring scheme:\n\n- the pixel with coordinates <var>x</var> = 0,
23
- <var>y</var> = 0 corresponds to the bottom left pixel,\n- if (<var>x</var> - 2<sup><var>N</var>-1</sup>)<sup>2</sup> + (<var>y</var> - 2<sup><var>N</var>-1</sup>)<sup>2</sup> 
24
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 2<sup>2<var>N</var>-2</sup>
25
- then the pixel is black,\n- otherwise the pixel is white.\n\nWhat is the length
26
- of the minimal sequence describing <var>D</var><sub>24</sub> ?\n\n"
22
+ ![×]({{ images_dir }}/symbol_times.gif)2<sup><var>N</var></sup> image with the following
23
+ coloring scheme:\n\n- the pixel with coordinates <var>x</var> = 0, <var>y</var> = 0
24
+ corresponds to the bottom left pixel,\n- if (<var>x</var> - 2<sup><var>N</var>-1</sup>)<sup>2</sup> + (<var>y</var> - 2<sup><var>N</var>-1</sup>)<sup>2</sup> 
25
+ ![≤]({{ images_dir }}/symbol_le.gif) 2<sup>2<var>N</var>-2</sup> then the pixel
26
+ is black,\n- otherwise the pixel is white.\n\nWhat is the length of the minimal
27
+ sequence describing <var>D</var><sub>24</sub> ?\n\n"
@@ -3,7 +3,7 @@
3
3
  :name: An enormous factorial
4
4
  :url: http://projecteuler.net/problem=288
5
5
  :content: "For any prime <var>p</var> the number N(<var>p</var>,<var>q</var>) is defined
6
- by\rN(<var>p</var>,<var>q</var>) = ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)<sub><var>n</var>=0
6
+ by\rN(<var>p</var>,<var>q</var>) = ![∑]({{ images_dir }}/symbol_sum.gif)<sub><var>n</var>=0
7
7
  to <var>q</var></sub> T<sub><var>n</var></sub>\\*<var>p</var><sup><var>n</var></sup>
8
8
  \ \n with T<sub><var>n</var></sub> generated by the following random number generator:\n\nS<sub>0</sub>
9
9
  = 290797 \n\rS<sub><var>n</var>+1</sub> = S<sub><var>n</var></sub><sup>2</sup>
@@ -12,7 +12,7 @@
12
12
  are possible on E(<var>m</var>,<var>n</var>), but we are only interested in those
13
13
  which are not self-crossing: \rA non-crossing path just touches itself at lattice
14
14
  points, but it never crosses itself.\n\nThe image below shows E(3,3) and an example
15
- of an Eulerian non-crossing path.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_289_euler.gif)\n\nLet
15
+ of an Eulerian non-crossing path.\n\n ![]({{ images_dir }}/p_289_euler.gif)\n\nLet
16
16
  L(<var>m</var>,<var>n</var>) be the number of Eulerian non-crossing paths on E(<var>m</var>,<var>n</var>).
17
17
  \ \n\rFor example, L(1,2) = 2, L(2,2) = 37 and L(3,3) = 104290.\n\nFind L(6,10)
18
18
  mod 10<sup>10</sup>.\n\n"
data/data/problems/29.yml CHANGED
@@ -2,16 +2,15 @@
2
2
  :id: 29
3
3
  :name: Distinct powers
4
4
  :url: http://projecteuler.net/problem=29
5
- :content: "Consider all integer combinations of _a_<sup><i>b</i></sup> for 2 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- _a_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 5 and
7
- 2 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _b_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
- 5:\n\n> 2<sup>2</sup>=4, 2<sup>3</sup>=8, 2<sup>4</sup>=16, 2<sup>5</sup>=32 \n>
9
- 3<sup>2</sup>=9, 3<sup>3</sup>=27, 3<sup>4</sup>=81, 3<sup>5</sup>=243 \n> 4<sup>2</sup>=16,
10
- 4<sup>3</sup>=64, 4<sup>4</sup>=256, 4<sup>5</sup>=1024 \n> 5<sup>2</sup>=25, 5<sup>3</sup>=125,
11
- 5<sup>4</sup>=625, 5<sup>5</sup>=3125\n\nIf they are then placed in numerical order,
12
- with any repeats removed, we get the following sequence of 15 distinct terms:\n\n4,
13
- 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125\n\nHow many distinct
14
- terms are in the sequence generated by _a_<sup><i>b</i></sup> for 2 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
15
- _a_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 100 and
16
- 2 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _b_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
17
- 100?\n\n"
5
+ :content: "Consider all integer combinations of _a_<sup><i>b</i></sup> for 2 ![≤]({{
6
+ images_dir }}/symbol_le.gif) _a_ ![≤]({{ images_dir }}/symbol_le.gif) 5 and 2 ![≤]({{
7
+ images_dir }}/symbol_le.gif) _b_ ![≤]({{ images_dir }}/symbol_le.gif) 5:\n\n> 2<sup>2</sup>=4,
8
+ 2<sup>3</sup>=8, 2<sup>4</sup>=16, 2<sup>5</sup>=32 \n> 3<sup>2</sup>=9, 3<sup>3</sup>=27,
9
+ 3<sup>4</sup>=81, 3<sup>5</sup>=243 \n> 4<sup>2</sup>=16, 4<sup>3</sup>=64, 4<sup>4</sup>=256,
10
+ 4<sup>5</sup>=1024 \n> 5<sup>2</sup>=25, 5<sup>3</sup>=125, 5<sup>4</sup>=625,
11
+ 5<sup>5</sup>=3125\n\nIf they are then placed in numerical order, with any repeats
12
+ removed, we get the following sequence of 15 distinct terms:\n\n4, 8, 9, 16, 25,
13
+ 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125\n\nHow many distinct terms are in
14
+ the sequence generated by _a_<sup><i>b</i></sup> for 2 ![≤]({{ images_dir }}/symbol_le.gif)
15
+ _a_ ![≤]({{ images_dir }}/symbol_le.gif) 100 and 2 ![≤]({{ images_dir }}/symbol_le.gif)
16
+ _b_ ![≤]({{ images_dir }}/symbol_le.gif) 100?\n\n"
@@ -3,5 +3,5 @@
3
3
  :name: Digital Signature
4
4
  :url: http://projecteuler.net/problem=290
5
5
  :content: |+
6
- How many integers 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var> &lt 10<sup>18</sup> have the property that the sum of the digits of <var>n</var> equals the sum of digits of 137<var>n</var>?
6
+ How many integers 0 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var> &lt 10<sup>18</sup> have the property that the sum of the digits of <var>n</var> equals the sum of digits of 137<var>n</var>?
7
7
 
@@ -2,6 +2,6 @@
2
2
  :id: 291
3
3
  :name: Panaitopol Primes
4
4
  :url: http://projecteuler.net/problem=291
5
- :content: "A prime number <var>p</var> is called a Panaitopol prime if ![](/home/will/src/euler-manager/config/../data/images/p_291_formula.gif)
6
- for some positive integers \n <var>x</var> and <var>y</var>.\n\nFind how many Panaitopol
7
- primes are less than 5 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)10<sup>15</sup>.\n\n"
5
+ :content: "A prime number <var>p</var> is called a Panaitopol prime if ![]({{ images_dir
6
+ }}/p_291_formula.gif) for some positive integers \n <var>x</var> and <var>y</var>.\n\nFind
7
+ how many Panaitopol primes are less than 5 ![×]({{ images_dir }}/symbol_times.gif)10<sup>15</sup>.\n\n"
@@ -6,7 +6,7 @@
6
6
  the following properties:\n\n- there are at least three vertices,\n- no three vertices
7
7
  are aligned,\n- each vertex has **integer coordinates** ,\n- each edge has **integer
8
8
  length** .\n\nFor a given integer <var>n</var>, define P(<var>n</var>) as the number
9
- of distinct pythagorean polygons for which the perimeter is ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>.
9
+ of distinct pythagorean polygons for which the perimeter is ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var>.
10
10
  \ \n\rPythagorean polygons should be considered distinct as long as none is a translation
11
11
  of another.\n\nYou are given that P(4) = 1, P(30) = 3655 and P(60) = 891045. \n\rFind
12
12
  P(120).\n\n"
@@ -5,10 +5,10 @@
5
5
  :content: "An even positive integer N will be called admissible, if it is a power
6
6
  of 2 or its distinct prime factors are consecutive primes. \n\rThe first twelve
7
7
  admissible numbers are 2,4,6,8,12,16,18,24,30,32,36,48.\n\nIf N is admissible, the
8
- smallest integer M ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
9
- 1 such that N+M is prime, will be called the pseudo-Fortunate number for N.\n\nFor
10
- example, N=630 is admissible since it is even and its distinct prime factors are
11
- the consecutive primes 2,3,5 and 7. \n \rThe next prime number after 631 is 641;
12
- hence, the pseudo-Fortunate number for 630 is M=11. \n\rIt can also be seen that
13
- the pseudo-Fortunate number for 16 is 3.\n\nFind the sum of all distinct pseudo-Fortunate
14
- numbers for admissible numbers N less than 10<sup>9</sup>.\n\n"
8
+ smallest integer M ![>]({{ images_dir }}/symbol_gt.gif) 1 such that N+M is prime,
9
+ will be called the pseudo-Fortunate number for N.\n\nFor example, N=630 is admissible
10
+ since it is even and its distinct prime factors are the consecutive primes 2,3,5
11
+ and 7. \n \rThe next prime number after 631 is 641; hence, the pseudo-Fortunate
12
+ number for 630 is M=11. \n\rIt can also be seen that the pseudo-Fortunate number
13
+ for 16 is 3.\n\nFind the sum of all distinct pseudo-Fortunate numbers for admissible
14
+ numbers N less than 10<sup>9</sup>.\n\n"
@@ -9,13 +9,13 @@
9
9
  <var>x</var><sup>2</sup>+<var>y</var><sup>2</sup>=25 \n\rC<sub>1</sub>: (<var>x</var>+4)<sup>2</sup>+(<var>y</var>-4)<sup>2</sup>=1
10
10
  \ \n\rC<sub>2</sub>: (<var>x</var>-12)<sup>2</sup>+(<var>y</var>-4)<sup>2</sup>=65\n\nThe
11
11
  circles C<sub>0</sub>, C<sub>1</sub> and C<sub>2</sub> are drawn in the picture
12
- below.\n\n ![](/home/will/src/euler-manager/config/../data/images/p295_lenticular.gif)\n\nC<sub>0</sub>
13
- and C<sub>1</sub> form a lenticular hole, as well as C<sub>0</sub> and C<sub>2</sub>.\n\nWe
14
- call an ordered pair of positive real numbers (r<sub>1</sub>, r<sub>2</sub>) a _lenticular
12
+ below.\n\n ![]({{ images_dir }}/p295_lenticular.gif)\n\nC<sub>0</sub> and C<sub>1</sub>
13
+ form a lenticular hole, as well as C<sub>0</sub> and C<sub>2</sub>.\n\nWe call an
14
+ ordered pair of positive real numbers (r<sub>1</sub>, r<sub>2</sub>) a _lenticular
15
15
  pair_ if there exist two circles with radii r<sub>1</sub> and r<sub>2</sub> that
16
- form a lenticular hole.\rWe can verify that (1, 5) and (5, ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)65)
16
+ form a lenticular hole.\rWe can verify that (1, 5) and (5, ![√]({{ images_dir }}/symbol_radic.gif)65)
17
17
  are the lenticular pairs of the example above.\n\nLet L(N) be the number of **distinct**
18
- lenticular pairs (r<sub>1</sub>, r<sub>2</sub>) for which 0 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
19
- r<sub>1</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
20
- r<sub>2</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
21
- N. \n\rWe can verify that L(10) = 30 and L(100) = 3442.\n\nFind L(100 000).\n\n"
18
+ lenticular pairs (r<sub>1</sub>, r<sub>2</sub>) for which 0 ![<]({{ images_dir }}/symbol_lt.gif)
19
+ r<sub>1</sub> ![≤]({{ images_dir }}/symbol_le.gif) r<sub>2</sub> ![≤]({{ images_dir
20
+ }}/symbol_le.gif) N. \n\rWe can verify that L(10) = 30 and L(100) = 3442.\n\nFind
21
+ L(100 000).\n\n"
@@ -2,12 +2,11 @@
2
2
  :id: 296
3
3
  :name: Angular Bisector and Tangent
4
4
  :url: http://projecteuler.net/problem=296
5
- :content: "Given is an integer sided triangle <var>ABC</var> with <var>BC</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- <var>AC</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
5
+ :content: "Given is an integer sided triangle <var>ABC</var> with <var>BC</var> ![≤]({{
6
+ images_dir }}/symbol_le.gif) <var>AC</var> ![≤]({{ images_dir }}/symbol_le.gif)
7
7
  <var>AB</var>. \n<var>k</var> is the angular bisector of angle <var>ACB</var>.
8
8
  \ \n <var>m</var> is the tangent at <var>C</var> to the circumscribed circle of
9
9
  <var>ABC</var>. \n <var>n</var> is a line parallel to <var>m</var> through <var>B</var>.
10
10
  \ \n\rThe intersection of <var>n</var> and <var>k</var> is called <var>E</var>.\n\n
11
- ![](/home/will/src/euler-manager/config/../data/images/p296_bisector.gif)\n\nHow
12
- many triangles <var>ABC</var> with a perimeter not exceeding 100 000 exist such
13
- that <var>BE</var> has integral length?\n\n"
11
+ ![]({{ images_dir }}/p296_bisector.gif)\n\nHow many triangles <var>ABC</var> with
12
+ a perimeter not exceeding 100 000 exist such that <var>BE</var> has integral length?\n\n"
@@ -9,8 +9,7 @@
9
9
  a sum is called the **Zeckendorf representation** of the number.\n\nFor any integer
10
10
  <var>n</var>>0, let <var>z</var>(<var>n</var>) be the number of terms in the Zeckendorf
11
11
  representation of <var>n</var>. \n\rThus, <var>z</var>(5) = 1, <var>z</var>(14) = 2,
12
- <var>z</var>(100) = 3 etc. \n\rAlso, for 0 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>n</var>
13
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)10<sup>6</sup>,
14
- ∑ <var>z</var>(<var>n</var>) = 7894453.\n\nFind ∑ <var>z</var>(<var>n</var>) for
15
- 0 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>n</var>
16
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)10<sup>17</sup>.\n\n"
12
+ <var>z</var>(100) = 3 etc. \n\rAlso, for 0 ![<]({{ images_dir }}/symbol_lt.gif)<var>n</var>
13
+ ![<]({{ images_dir }}/symbol_lt.gif)10<sup>6</sup>, ∑ <var>z</var>(<var>n</var>) = 7894453.\n\nFind
14
+ ∑ <var>z</var>(<var>n</var>) for 0 ![<]({{ images_dir }}/symbol_lt.gif)<var>n</var>
15
+ ![<]({{ images_dir }}/symbol_lt.gif)10<sup>17</sup>.\n\n"
@@ -3,23 +3,22 @@
3
3
  :name: Three similar triangles
4
4
  :url: http://projecteuler.net/problem=299
5
5
  :content: "Four points with integer coordinates are selected: \nA(<var>a</var>, 0),
6
- B(<var>b</var>, 0), C(0, <var>c</var>) and D(0, <var>d</var>), \rwith 0  ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>a</var> 
7
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>b</var>
8
- and 0  ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>c</var> 
9
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>d</var>.
6
+ B(<var>b</var>, 0), C(0, <var>c</var>) and D(0, <var>d</var>), \rwith 0  ![<]({{
7
+ images_dir }}/symbol_lt.gif) <var>a</var>  ![<]({{ images_dir }}/symbol_lt.gif) <var>b</var>
8
+ and 0  ![<]({{ images_dir }}/symbol_lt.gif) <var>c</var>  ![<]({{ images_dir }}/symbol_lt.gif) <var>d</var>.
10
9
  \ \n\rPoint P, also with integer coordinates, is chosen on the line AC so that the
11
10
  three triangles ABP, CDP and BDP are all <dfn title=\"Have equal angles\">similar</dfn>.\n\n
12
- ![](/home/will/src/euler-manager/config/../data/images/p_299_ThreeSimTri.gif)\n\nIt
13
- is easy to prove that the three triangles can be similar, only if <var>a</var>=<var>c</var>.\n\nSo,
14
- given that <var>a</var>=<var>c</var>, we are looking for triplets (<var>a</var>,<var>b</var>,<var>d</var>)
15
- such that at least one point P (with integer coordinates) exists on AC, making the
16
- three triangles ABP, CDP and BDP all similar.\n\nFor example, if (<var>a</var>,<var>b</var>,<var>d</var>)=(2,3,4),
11
+ ![]({{ images_dir }}/p_299_ThreeSimTri.gif)\n\nIt is easy to prove that the three
12
+ triangles can be similar, only if <var>a</var>=<var>c</var>.\n\nSo, given that <var>a</var>=<var>c</var>,
13
+ we are looking for triplets (<var>a</var>,<var>b</var>,<var>d</var>) such that at
14
+ least one point P (with integer coordinates) exists on AC, making the three triangles
15
+ ABP, CDP and BDP all similar.\n\nFor example, if (<var>a</var>,<var>b</var>,<var>d</var>)=(2,3,4),
17
16
  it can be easily verified that point P(1,1) satisfies the above condition. \rNote
18
17
  that the triplets (2,3,4) and (2,4,3) are considered as distinct, although point
19
- P(1,1) is common for both.\n\nIf <var>b</var>+<var>d</var>  ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 100,
18
+ P(1,1) is common for both.\n\nIf <var>b</var>+<var>d</var>  ![<]({{ images_dir }}/symbol_lt.gif) 100,
20
19
  there are 92 distinct triplets (<var>a</var>,<var>b</var>,<var>d</var>) such that
21
- point P exists. \n\rIf <var>b</var>+<var>d</var>  ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 100
20
+ point P exists. \n\rIf <var>b</var>+<var>d</var>  ![<]({{ images_dir }}/symbol_lt.gif) 100
22
21
  000, there are 320471 distinct triplets (<var>a</var>,<var>b</var>,<var>d</var>)
23
- such that point P exists.\n\nIf <var>b</var>+<var>d</var>  ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 100
22
+ such that point P exists.\n\nIf <var>b</var>+<var>d</var>  ![<]({{ images_dir }}/symbol_lt.gif) 100
24
23
  000 000, how many distinct triplets (<var>a</var>,<var>b</var>,<var>d</var>) are
25
24
  there such that point P exists?\n\n"
@@ -12,12 +12,13 @@
12
12
  in the inner part, with the P-elements on the outside. \n\rNatural proteins are
13
13
  folded in three dimensions of course, but we will only consider protein folding
14
14
  in <u>two dimensions</u>.\n\nThe figure below shows two possible ways that our example
15
- protein could be folded (H-H contact points are shown with red dots).\n\n ![](/home/will/src/euler-manager/config/../data/images/p_300_protein.gif)\n\nThe
16
- folding on the left has only six H-H contact points, thus it would never occur naturally.
17
- \ \n\rOn the other hand, the folding on the right has nine H-H contact points, which
18
- is optimal for this string.\n\nAssuming that H and P elements are equally likely
19
- to occur in any position along the string, the average number of H-H contact points
20
- in an optimal folding of a random protein string of length 8 turns out to be 850 / 2<sup>8</sup>=3.3203125.\n\nWhat
21
- is the average number of H-H contact points in an optimal folding of a random protein
22
- string of length 15? \n\rGive your answer using as many decimal places as necessary
23
- for an exact result.\n\n"
15
+ protein could be folded (H-H contact points are shown with red dots).\n\n ![]({{
16
+ images_dir }}/p_300_protein.gif)\n\nThe folding on the left has only six H-H contact
17
+ points, thus it would never occur naturally. \n\rOn the other hand, the folding
18
+ on the right has nine H-H contact points, which is optimal for this string.\n\nAssuming
19
+ that H and P elements are equally likely to occur in any position along the string,
20
+ the average number of H-H contact points in an optimal folding of a random protein
21
+ string of length 8 turns out to be 850 / 2<sup>8</sup>=3.3203125.\n\nWhat is the
22
+ average number of H-H contact points in an optimal folding of a random protein string
23
+ of length 15? \n\rGive your answer using as many decimal places as necessary for
24
+ an exact result.\n\n"
@@ -19,5 +19,5 @@
19
19
  stones remain; so the current player loses. To illustrate: \n\r- current player
20
20
  moves to (1,2,1) \n\r- opponent moves to (1,0,1) \n\r- current player moves to
21
21
  (0,0,1) \n\r- opponent moves to (0,0,0), and so wins.\n\nFor how many positive
22
- integers <var>n</var>  ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 2<sup>30</sup>
23
- does <var>X</var>(<var>n</var>,2<var>n</var>,3<var>n</var>) = 0 ?\n\n"
22
+ integers <var>n</var>  ![≤]({{ images_dir }}/symbol_le.gif) 2<sup>30</sup> does
23
+ <var>X</var>(<var>n</var>,2<var>n</var>,3<var>n</var>) = 0 ?\n\n"
@@ -3,11 +3,11 @@
3
3
  :name: Multiples with small digits
4
4
  :url: http://projecteuler.net/problem=303
5
5
  :content: |+
6
- For a positive integer <var>n</var>, define <var>f</var>(<var>n</var>) as the least positive multiple of <var>n</var> that, written in base 10, uses only digits ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 2.
6
+ For a positive integer <var>n</var>, define <var>f</var>(<var>n</var>) as the least positive multiple of <var>n</var> that, written in base 10, uses only digits ![≤]({{ images_dir }}/symbol_le.gif) 2.
7
7
 
8
8
  Thus <var>f</var>(2)=2, <var>f</var>(3)=12, <var>f</var>(7)=21, <var>f</var>(42)=210, <var>f</var>(89)=1121222.
9
9
 
10
- Also, ![](/home/will/src/euler-manager/config/../data/images/p303_formula100.gif).
10
+ Also, ![]({{ images_dir }}/p303_formula100.gif).
11
11
 
12
- Find ![](/home/will/src/euler-manager/config/../data/images/p303_formula10000.gif).
12
+ Find ![]({{ images_dir }}/p303_formula10000.gif).
13
13
 
@@ -3,12 +3,11 @@
3
3
  :name: Primonacci
4
4
  :url: http://projecteuler.net/problem=304
5
5
  :content: "For any positive integer <var>n</var> the function next\\_prime(<var>n</var>)
6
- returns the smallest prime p \n such that p ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)<var>n</var>.\n\nThe
6
+ returns the smallest prime p \n such that p ![>]({{ images_dir }}/symbol_gt.gif)<var>n</var>.\n\nThe
7
7
  sequence a(<var>n</var>) is defined by: \n\ra(1)=next\\_prime(10<sup>14</sup>)
8
- and a(<var>n</var>)=next\\_prime(a(<var>n</var>-1)) for n ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)1.\n\nThe
8
+ and a(<var>n</var>)=next\\_prime(a(<var>n</var>-1)) for n ![>]({{ images_dir }}/symbol_gt.gif)1.\n\nThe
9
9
  fibonacci sequence f(<var>n</var>) is defined by:\rf(0)=0, f(1)=1 and f(<var>n</var>)=f(<var>n</var>-1)+f(<var>n</var>-2)
10
- for <var>n</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)1.\n\nThe
11
- sequence b(<var>n</var>) is defined as f(a(<var>n</var>)).\n\nFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)b(<var>n</var>)
12
- for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)<var>n</var>
13
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)100 000. \rGive
14
- your answer mod 1234567891011.\n\n"
10
+ for <var>n</var> ![>]({{ images_dir }}/symbol_gt.gif)1.\n\nThe sequence b(<var>n</var>)
11
+ is defined as f(a(<var>n</var>)).\n\nFind ![∑]({{ images_dir }}/symbol_sum.gif)b(<var>n</var>)
12
+ for 1 ![≤]({{ images_dir }}/symbol_le.gif)<var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)100
13
+ 000. \rGive your answer mod 1234567891011.\n\n"
@@ -6,5 +6,6 @@
6
6
  positive integers (starting from 1) written down in base 10. \n \rThus, S = 1234567891011121314151617181920212223242...\n\nIt's
7
7
  easy to see that any number will show up an infinite number of times in S.\n\nLet's
8
8
  call f(n) the starting position of the n<sup>th</sup> occurrence of n in S. \n
9
- \rFor example, f(1)=1, f(5)=81, f(12)=271 and f(7780)=111111365.\n\nFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)f(3<sup>k</sup>)
10
- for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)k ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)13.\n\n"
9
+ \rFor example, f(1)=1, f(5)=81, f(12)=271 and f(7780)=111111365.\n\nFind ![∑]({{
10
+ images_dir }}/symbol_sum.gif)f(3<sup>k</sup>) for 1 ![≤]({{ images_dir }}/symbol_le.gif)k
11
+ ![≤]({{ images_dir }}/symbol_le.gif)13.\n\n"
@@ -12,14 +12,11 @@
12
12
  loses.\n- If <var>n</var> = 4, there are three valid moves for the first player;
13
13
  she can win the game by painting the two middle squares.\n- If <var>n</var> = 5,
14
14
  there are four valid moves for the first player (shown below in red); but no matter
15
- what she does, the second player (blue) wins.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_306_pstrip.gif)\n\nSo,
16
- for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
17
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 5, there
18
- are 3 values of <var>n</var> for which the first player can force a win. \n\rSimilarly,
19
- for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
20
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 50, there
21
- are 40 values of <var>n</var> for which the first player can force a win.\n\nFor
22
- 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
23
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1 000 000,
24
- how many values of <var>n</var> are there for which the first player can force a
25
- win?\n\n"
15
+ what she does, the second player (blue) wins.\n\n ![]({{ images_dir }}/p_306_pstrip.gif)\n\nSo,
16
+ for 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)
17
+ 5, there are 3 values of <var>n</var> for which the first player can force a win.
18
+ \ \n\rSimilarly, for 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var> ![≤]({{
19
+ images_dir }}/symbol_le.gif) 50, there are 40 values of <var>n</var> for which the
20
+ first player can force a win.\n\nFor 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var>
21
+ ![≤]({{ images_dir }}/symbol_le.gif) 1 000 000, how many values of <var>n</var>
22
+ are there for which the first player can force a win?\n\n"
@@ -6,6 +6,5 @@
6
6
  chips produced by a factory (any number of defects may be found on a chip and each
7
7
  defect is independent of the other defects).\n\nLet p(<var>k,n</var>) represent
8
8
  the probability that there is a chip with at least 3 defects. \n\rFor instance
9
- p(3,7) ![≈](/home/will/src/euler-manager/config/../data/images/symbol_asymp.gif)
10
- 0.0204081633.\n\nFind p(20 000, 1 000 000) and give your answer rounded to 10 decimal
11
- places in the form 0.abcdefghij\n\n"
9
+ p(3,7) ![≈]({{ images_dir }}/symbol_asymp.gif) 0.0204081633.\n\nFind p(20 000, 1
10
+ 000 000) and give your answer rounded to 10 decimal places in the form 0.abcdefghij\n\n"
@@ -6,11 +6,11 @@
6
6
  and <var>y</var> of two ladders resting on the opposite walls of a narrow, level
7
7
  street. We are also given the height <var>h</var> above the street where the two
8
8
  ladders cross and we are asked to find the width of the street (<var>w</var>).\n\n
9
- ![](/home/will/src/euler-manager/config/../data/images/p_309_ladders.gif)\n\nHere,
10
- we are only concerned with instances where all four variables are positive integers.
11
- \ \n\rFor example, if <var>x</var> = 70, <var>y</var> = 119 and <var>h</var> = 30,
12
- we can calculate that <var>w</var> = 56.\n\nIn fact, for integer values <var>x</var>,
13
- <var>y</var>, <var>h</var> and 0 x y x,<var>y</var>,<var>h</var>) producing integer
14
- solutions for <var>w</var>: \n\r(70, 119, 30), (74, 182, 21), (87, 105, 35), (100,
15
- 116, 35) and (119, 175, 40).\n\nFor integer values <var>x</var>, <var>y</var>, <var>h</var>
16
- and 0 x y x,<var>y</var>,<var>h</var>) produce integer solutions for <var>w</var>?\n\n"
9
+ ![]({{ images_dir }}/p_309_ladders.gif)\n\nHere, we are only concerned with instances
10
+ where all four variables are positive integers. \n\rFor example, if <var>x</var>
11
+ = 70, <var>y</var> = 119 and <var>h</var> = 30, we can calculate that <var>w</var>
12
+ = 56.\n\nIn fact, for integer values <var>x</var>, <var>y</var>, <var>h</var> and
13
+ 0 x y x,<var>y</var>,<var>h</var>) producing integer solutions for <var>w</var>:
14
+ \ \n\r(70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) and (119, 175,
15
+ 40).\n\nFor integer values <var>x</var>, <var>y</var>, <var>h</var> and 0 x y x,<var>y</var>,<var>h</var>)
16
+ produce integer solutions for <var>w</var>?\n\n"
data/data/problems/31.yml CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  It is possible to make £2 in the following way:
11
11
 
12
- > 1 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)£1 + 1 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)50p + 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)20p + 1 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)5p + 1 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2p + 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)1p
12
+ > 1 ![×]({{ images_dir }}/symbol_times.gif)£1 + 1 ![×]({{ images_dir }}/symbol_times.gif)50p + 2 ![×]({{ images_dir }}/symbol_times.gif)20p + 1 ![×]({{ images_dir }}/symbol_times.gif)5p + 1 ![×]({{ images_dir }}/symbol_times.gif)2p + 3 ![×]({{ images_dir }}/symbol_times.gif)1p
13
13
 
14
14
  How many different ways can £2 be made using any number of coins?
15
15
 
@@ -5,10 +5,9 @@
5
5
  :content: "Alice and Bob play the game Nim Square. \n\rNim Square is just like ordinary
6
6
  three-heap normal play Nim, but the players may only remove a square number of stones
7
7
  from a heap. \n\rThe number of stones in the three heaps is represented by the
8
- ordered triple (a,b,c). \n\rIf 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)a
9
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)b ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)c
10
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)29 then the
11
- number of losing positions for the next player is 1160.\n\nFind the number of losing
12
- positions for the next player if 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)a
13
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)b ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)c
14
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)100 000.\n\n"
8
+ ordered triple (a,b,c). \n\rIf 0 ![≤]({{ images_dir }}/symbol_le.gif)a ![≤]({{
9
+ images_dir }}/symbol_le.gif)b ![≤]({{ images_dir }}/symbol_le.gif)c ![≤]({{ images_dir
10
+ }}/symbol_le.gif)29 then the number of losing positions for the next player is 1160.\n\nFind
11
+ the number of losing positions for the next player if 0 ![≤]({{ images_dir }}/symbol_le.gif)a
12
+ ![≤]({{ images_dir }}/symbol_le.gif)b ![≤]({{ images_dir }}/symbol_le.gif)c ![≤]({{
13
+ images_dir }}/symbol_le.gif)100 000.\n\n"
@@ -2,14 +2,14 @@
2
2
  :id: 311
3
3
  :name: Biclinic Integral Quadrilaterals
4
4
  :url: http://projecteuler.net/problem=311
5
- :content: "ABCD is a convex, integer sided quadrilateral with 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- AB ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) BC ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
7
- CD ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) AD. \n\rBD
8
- has integer length. O is the midpoint of BD. AO has integer length. \n\rWe'll call
9
- ABCD a _biclinic integral quadrilateral_ if AO = CO ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
10
- BO = DO.\n\nFor example, the following quadrilateral is a biclinic integral quadrilateral:
11
- \ \n\rAB = 19, BC = 29, CD = 37, AD = 43, BD = 48 and AO = CO = 23.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_311_biclinic.gif)\n\nLet
12
- B(<var>N</var>) be the number of distinct biclinic integral quadrilaterals ABCD
13
- that satisfy AB<sup>2</sup>+BC<sup>2</sup>+CD<sup>2</sup>+AD<sup>2</sup> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
14
- <var>N</var>. \n\rWe can verify that B(10 000) = 49 and B(1 000 000) = 38239.\n\nFind
15
- B(10 000 000 000).\n\n"
5
+ :content: "ABCD is a convex, integer sided quadrilateral with 1 ![≤]({{ images_dir
6
+ }}/symbol_le.gif) AB ![<]({{ images_dir }}/symbol_lt.gif) BC ![<]({{ images_dir
7
+ }}/symbol_lt.gif) CD ![<]({{ images_dir }}/symbol_lt.gif) AD. \n\rBD has integer
8
+ length. O is the midpoint of BD. AO has integer length. \n\rWe'll call ABCD a _biclinic
9
+ integral quadrilateral_ if AO = CO ![≤]({{ images_dir }}/symbol_le.gif) BO = DO.\n\nFor
10
+ example, the following quadrilateral is a biclinic integral quadrilateral: \n\rAB
11
+ = 19, BC = 29, CD = 37, AD = 43, BD = 48 and AO = CO = 23.\n\n ![]({{ images_dir
12
+ }}/p_311_biclinic.gif)\n\nLet B(<var>N</var>) be the number of distinct biclinic
13
+ integral quadrilaterals ABCD that satisfy AB<sup>2</sup>+BC<sup>2</sup>+CD<sup>2</sup>+AD<sup>2</sup>
14
+ ![≤]({{ images_dir }}/symbol_le.gif) <var>N</var>. \n\rWe can verify that B(10
15
+ 000) = 49 and B(1 000 000) = 38239.\n\nFind B(10 000 000 000).\n\n"
@@ -5,10 +5,10 @@
5
5
  :content: "- A **Sierpiński graph** of order-1 (<var>S</var><sub>1</sub>) is an equilateral
6
6
  triangle. \n\r- <var>S</var><sub><var>n</var>+1</sub> is obtained from <var>S</var><sub><var>n</var></sub>
7
7
  by positioning three copies of <var>S</var><sub><var>n</var></sub> so that every
8
- pair of copies has one common corner.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_312_sierpinskyAt.gif)\n\nLet
8
+ pair of copies has one common corner.\n\n ![]({{ images_dir }}/p_312_sierpinskyAt.gif)\n\nLet
9
9
  C(<var>n</var>) be the number of cycles that pass exactly once through all the vertices
10
10
  of <var>S</var><sub><var>n</var></sub>. \n\rFor example, C(3) = 8 because eight
11
- such cycles can be drawn on <var>S</var><sub>3</sub>, as shown below:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_312_sierpinsky8t.gif)\n\nIt
12
- can also be verified that : \n\rC(1) = C(2) = 1 \n\rC(5) = 71328803586048 \n\rC(10
13
- 000) mod 10<sup>8</sup> = 37652224 \n\rC(10 000) mod 13<sup>8</sup> = 617720485\n\nFind
14
- C(C(C(10 000))) mod 13<sup>8</sup>.\n\n"
11
+ such cycles can be drawn on <var>S</var><sub>3</sub>, as shown below:\n\n ![]({{
12
+ images_dir }}/p_312_sierpinsky8t.gif)\n\nIt can also be verified that : \n\rC(1)
13
+ = C(2) = 1 \n\rC(5) = 71328803586048 \n\rC(10 000) mod 10<sup>8</sup> = 37652224
14
+ \ \n\rC(10 000) mod 13<sup>8</sup> = 617720485\n\nFind C(C(C(10 000))) mod 13<sup>8</sup>.\n\n"
@@ -5,13 +5,13 @@
5
5
  :content: |+
6
6
  In a sliding game a counter may slide horizontally or vertically into an empty space. The objective of the game is to move the red counter from the top left corner of a grid to the bottom right corner; the space always starts in the bottom right corner. For example, the following sequence of pictures show how the game can be completed in five moves on a 2 by 2 grid.
7
7
 
8
- ![](/home/will/src/euler-manager/config/../data/images/p_313_sliding_game_1.gif)
8
+ ![]({{ images_dir }}/p_313_sliding_game_1.gif)
9
9
 
10
10
  Let S(m,n) represent the minimum number of moves to complete the game on an m by n grid. For example, it can be verified that S(5,4) = 25.
11
11
 
12
- ![](/home/will/src/euler-manager/config/../data/images/p_313_sliding_game_2.gif)
12
+ ![]({{ images_dir }}/p_313_sliding_game_2.gif)
13
13
 
14
- There are exactly 5482 grids for which S(m,n) = p<sup>2</sup>, where p ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 100 is prime.
14
+ There are exactly 5482 grids for which S(m,n) = p<sup>2</sup>, where p ![<]({{ images_dir }}/symbol_lt.gif) 100 is prime.
15
15
 
16
- How many grids does S(m,n) = p<sup>2</sup>, where p ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 10<sup>6</sup> is prime?
16
+ How many grids does S(m,n) = p<sup>2</sup>, where p ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>6</sup> is prime?
17
17
 
@@ -18,10 +18,9 @@
18
18
  inside the square area touching the four sides the area will be equal to π\\*250<sup>2</sup>
19
19
  m<sup>2</sup> and the perimeter will be π\\*500 m, so the enclosed-area/wall-length
20
20
  ratio will also be 125.\n\nHowever, if you cut off from the square four triangles
21
- with sides 75 m, 75 m and 75 ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2
22
- m the total area becomes 238750 m<sup>2</sup> and the perimeter becomes 1400+300
23
- ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)2 m. So
24
- this gives an enclosed-area/wall-length ratio of 130.87, which is significantly
25
- better.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_314_landgrab.gif)\n\nFind
21
+ with sides 75 m, 75 m and 75 ![√]({{ images_dir }}/symbol_radic.gif)2 m the total
22
+ area becomes 238750 m<sup>2</sup> and the perimeter becomes 1400+300 ![√]({{ images_dir
23
+ }}/symbol_radic.gif)2 m. So this gives an enclosed-area/wall-length ratio of 130.87,
24
+ which is significantly better.\n\n ![]({{ images_dir }}/p_314_landgrab.gif)\n\nFind
26
25
  the maximum enclosed-area/wall-length ratio. \n\rGive your answer rounded to 8
27
26
  places behind the decimal point in the form abc.defghijk.\n\n"