euler-manager 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/data/images/sod_13.gif +4 -0
  4. data/data/problems/100.yml +1 -1
  5. data/data/problems/101.yml +16 -16
  6. data/data/problems/102.yml +2 -3
  7. data/data/problems/103.yml +16 -16
  8. data/data/problems/105.yml +2 -2
  9. data/data/problems/106.yml +2 -2
  10. data/data/problems/107.yml +15 -15
  11. data/data/problems/108.yml +13 -16
  12. data/data/problems/109.yml +16 -17
  13. data/data/problems/11.yml +22 -23
  14. data/data/problems/110.yml +9 -10
  15. data/data/problems/114.yml +30 -41
  16. data/data/problems/116.yml +19 -25
  17. data/data/problems/117.yml +24 -33
  18. data/data/problems/120.yml +3 -3
  19. data/data/problems/122.yml +18 -20
  20. data/data/problems/123.yml +2 -2
  21. data/data/problems/124.yml +18 -23
  22. data/data/problems/126.yml +10 -11
  23. data/data/problems/127.yml +7 -7
  24. data/data/problems/128.yml +1 -1
  25. data/data/problems/130.yml +6 -7
  26. data/data/problems/131.yml +1 -1
  27. data/data/problems/132.yml +1 -1
  28. data/data/problems/134.yml +2 -2
  29. data/data/problems/135.yml +2 -2
  30. data/data/problems/136.yml +2 -2
  31. data/data/problems/137.yml +4 -4
  32. data/data/problems/138.yml +4 -4
  33. data/data/problems/139.yml +1 -1
  34. data/data/problems/14.yml +12 -13
  35. data/data/problems/140.yml +3 -3
  36. data/data/problems/142.yml +1 -1
  37. data/data/problems/143.yml +2 -2
  38. data/data/problems/144.yml +3 -3
  39. data/data/problems/147.yml +1 -1
  40. data/data/problems/149.yml +11 -13
  41. data/data/problems/15.yml +3 -3
  42. data/data/problems/150.yml +8 -8
  43. data/data/problems/151.yml +1 -1
  44. data/data/problems/152.yml +1 -1
  45. data/data/problems/153.yml +24 -26
  46. data/data/problems/154.yml +10 -9
  47. data/data/problems/155.yml +3 -3
  48. data/data/problems/156.yml +7 -8
  49. data/data/problems/157.yml +3 -4
  50. data/data/problems/158.yml +4 -5
  51. data/data/problems/159.yml +3 -3
  52. data/data/problems/161.yml +5 -4
  53. data/data/problems/163.yml +10 -10
  54. data/data/problems/165.yml +1 -1
  55. data/data/problems/166.yml +7 -7
  56. data/data/problems/167.yml +3 -4
  57. data/data/problems/168.yml +5 -5
  58. data/data/problems/170.yml +2 -2
  59. data/data/problems/171.yml +3 -3
  60. data/data/problems/173.yml +1 -1
  61. data/data/problems/174.yml +3 -3
  62. data/data/problems/175.yml +4 -4
  63. data/data/problems/177.yml +1 -1
  64. data/data/problems/179.yml +1 -1
  65. data/data/problems/180.yml +8 -9
  66. data/data/problems/182.yml +22 -24
  67. data/data/problems/183.yml +14 -15
  68. data/data/problems/184.yml +2 -2
  69. data/data/problems/186.yml +10 -11
  70. data/data/problems/187.yml +6 -8
  71. data/data/problems/189.yml +10 -9
  72. data/data/problems/190.yml +1 -1
  73. data/data/problems/192.yml +11 -12
  74. data/data/problems/194.yml +8 -8
  75. data/data/problems/195.yml +2 -2
  76. data/data/problems/197.yml +5 -6
  77. data/data/problems/198.yml +11 -12
  78. data/data/problems/199.yml +7 -7
  79. data/data/problems/20.yml +8 -10
  80. data/data/problems/202.yml +1 -1
  81. data/data/problems/207.yml +4 -4
  82. data/data/problems/208.yml +4 -5
  83. data/data/problems/21.yml +5 -6
  84. data/data/problems/210.yml +4 -5
  85. data/data/problems/211.yml +1 -1
  86. data/data/problems/212.yml +22 -26
  87. data/data/problems/213.yml +5 -6
  88. data/data/problems/214.yml +8 -9
  89. data/data/problems/215.yml +4 -4
  90. data/data/problems/216.yml +5 -5
  91. data/data/problems/217.yml +8 -10
  92. data/data/problems/218.yml +1 -1
  93. data/data/problems/22.yml +1 -1
  94. data/data/problems/220.yml +15 -15
  95. data/data/problems/221.yml +4 -5
  96. data/data/problems/223.yml +5 -6
  97. data/data/problems/224.yml +5 -6
  98. data/data/problems/226.yml +8 -8
  99. data/data/problems/228.yml +4 -5
  100. data/data/problems/229.yml +16 -16
  101. data/data/problems/230.yml +4 -4
  102. data/data/problems/231.yml +4 -5
  103. data/data/problems/233.yml +1 -1
  104. data/data/problems/234.yml +9 -10
  105. data/data/problems/236.yml +4 -4
  106. data/data/problems/237.yml +3 -3
  107. data/data/problems/238.yml +3 -4
  108. data/data/problems/241.yml +4 -4
  109. data/data/problems/242.yml +2 -2
  110. data/data/problems/243.yml +12 -12
  111. data/data/problems/244.yml +10 -11
  112. data/data/problems/245.yml +14 -15
  113. data/data/problems/246.yml +10 -9
  114. data/data/problems/247.yml +12 -13
  115. data/data/problems/251.yml +3 -3
  116. data/data/problems/252.yml +6 -7
  117. data/data/problems/254.yml +2 -2
  118. data/data/problems/255.yml +35 -36
  119. data/data/problems/256.yml +16 -20
  120. data/data/problems/257.yml +9 -9
  121. data/data/problems/258.yml +5 -6
  122. data/data/problems/26.yml +1 -1
  123. data/data/problems/260.yml +6 -8
  124. data/data/problems/261.yml +6 -7
  125. data/data/problems/262.yml +1 -1
  126. data/data/problems/264.yml +10 -11
  127. data/data/problems/265.yml +1 -1
  128. data/data/problems/27.yml +10 -11
  129. data/data/problems/270.yml +3 -3
  130. data/data/problems/271.yml +5 -6
  131. data/data/problems/272.yml +6 -7
  132. data/data/problems/273.yml +3 -3
  133. data/data/problems/274.yml +15 -15
  134. data/data/problems/275.yml +3 -3
  135. data/data/problems/276.yml +3 -3
  136. data/data/problems/277.yml +3 -3
  137. data/data/problems/278.yml +15 -17
  138. data/data/problems/281.yml +4 -4
  139. data/data/problems/282.yml +2 -2
  140. data/data/problems/284.yml +7 -8
  141. data/data/problems/287.yml +18 -17
  142. data/data/problems/288.yml +1 -1
  143. data/data/problems/289.yml +1 -1
  144. data/data/problems/29.yml +12 -13
  145. data/data/problems/290.yml +1 -1
  146. data/data/problems/291.yml +3 -3
  147. data/data/problems/292.yml +1 -1
  148. data/data/problems/293.yml +7 -7
  149. data/data/problems/295.yml +8 -8
  150. data/data/problems/296.yml +4 -5
  151. data/data/problems/297.yml +4 -5
  152. data/data/problems/299.yml +11 -12
  153. data/data/problems/300.yml +10 -9
  154. data/data/problems/301.yml +2 -2
  155. data/data/problems/303.yml +3 -3
  156. data/data/problems/304.yml +6 -7
  157. data/data/problems/305.yml +3 -2
  158. data/data/problems/306.yml +8 -11
  159. data/data/problems/307.yml +2 -3
  160. data/data/problems/309.yml +8 -8
  161. data/data/problems/31.yml +1 -1
  162. data/data/problems/310.yml +6 -7
  163. data/data/problems/311.yml +11 -11
  164. data/data/problems/312.yml +5 -5
  165. data/data/problems/313.yml +4 -4
  166. data/data/problems/314.yml +4 -5
  167. data/data/problems/315.yml +26 -27
  168. data/data/problems/316.yml +2 -4
  169. data/data/problems/318.yml +27 -34
  170. data/data/problems/319.yml +11 -12
  171. data/data/problems/32.yml +1 -1
  172. data/data/problems/320.yml +1 -1
  173. data/data/problems/321.yml +3 -3
  174. data/data/problems/322.yml +4 -4
  175. data/data/problems/323.yml +7 -8
  176. data/data/problems/324.yml +8 -9
  177. data/data/problems/325.yml +1 -1
  178. data/data/problems/326.yml +2 -2
  179. data/data/problems/327.yml +27 -29
  180. data/data/problems/328.yml +2 -2
  181. data/data/problems/330.yml +13 -14
  182. data/data/problems/331.yml +12 -12
  183. data/data/problems/332.yml +10 -9
  184. data/data/problems/333.yml +15 -16
  185. data/data/problems/334.yml +14 -14
  186. data/data/problems/335.yml +2 -2
  187. data/data/problems/336.yml +5 -4
  188. data/data/problems/337.yml +7 -7
  189. data/data/problems/338.yml +21 -24
  190. data/data/problems/340.yml +6 -7
  191. data/data/problems/341.yml +3 -5
  192. data/data/problems/342.yml +6 -7
  193. data/data/problems/343.yml +8 -12
  194. data/data/problems/344.yml +1 -1
  195. data/data/problems/347.yml +8 -8
  196. data/data/problems/350.yml +5 -5
  197. data/data/problems/351.yml +1 -1
  198. data/data/problems/352.yml +25 -26
  199. data/data/problems/353.yml +1 -1
  200. data/data/problems/354.yml +6 -6
  201. data/data/problems/356.yml +2 -3
  202. data/data/problems/358.yml +13 -14
  203. data/data/problems/359.yml +1 -1
  204. data/data/problems/361.yml +2 -1
  205. data/data/problems/362.yml +11 -13
  206. data/data/problems/363.yml +6 -6
  207. data/data/problems/364.yml +3 -3
  208. data/data/problems/365.yml +2 -2
  209. data/data/problems/366.yml +4 -5
  210. data/data/problems/369.yml +1 -1
  211. data/data/problems/370.yml +3 -3
  212. data/data/problems/372.yml +6 -8
  213. data/data/problems/374.yml +5 -7
  214. data/data/problems/375.yml +5 -6
  215. data/data/problems/377.yml +2 -2
  216. data/data/problems/378.yml +2 -2
  217. data/data/problems/379.yml +7 -8
  218. data/data/problems/38.yml +9 -9
  219. data/data/problems/380.yml +12 -15
  220. data/data/problems/381.yml +8 -11
  221. data/data/problems/382.yml +6 -6
  222. data/data/problems/383.yml +4 -4
  223. data/data/problems/384.yml +7 -8
  224. data/data/problems/385.yml +8 -8
  225. data/data/problems/386.yml +2 -2
  226. data/data/problems/388.yml +5 -6
  227. data/data/problems/39.yml +1 -1
  228. data/data/problems/390.yml +4 -6
  229. data/data/problems/391.yml +11 -12
  230. data/data/problems/392.yml +1 -1
  231. data/data/problems/393.yml +2 -2
  232. data/data/problems/394.yml +6 -7
  233. data/data/problems/395.yml +5 -5
  234. data/data/problems/396.yml +15 -17
  235. data/data/problems/397.yml +5 -8
  236. data/data/problems/4.yml +1 -1
  237. data/data/problems/40.yml +1 -1
  238. data/data/problems/400.yml +5 -6
  239. data/data/problems/401.yml +2 -2
  240. data/data/problems/402.yml +7 -8
  241. data/data/problems/403.yml +9 -10
  242. data/data/problems/404.yml +5 -6
  243. data/data/problems/405.yml +7 -7
  244. data/data/problems/406.yml +8 -10
  245. data/data/problems/407.yml +9 -9
  246. data/data/problems/410.yml +5 -6
  247. data/data/problems/411.yml +11 -12
  248. data/data/problems/412.yml +9 -9
  249. data/data/problems/414.yml +13 -15
  250. data/data/problems/415.yml +2 -2
  251. data/data/problems/417.yml +4 -5
  252. data/data/problems/418.yml +7 -8
  253. data/data/problems/419.yml +8 -8
  254. data/data/problems/420.yml +5 -5
  255. data/data/problems/421.yml +11 -12
  256. data/data/problems/422.yml +9 -9
  257. data/data/problems/423.yml +5 -7
  258. data/data/problems/424.yml +8 -9
  259. data/data/problems/425.yml +2 -3
  260. data/data/problems/426.yml +3 -3
  261. data/data/problems/427.yml +8 -8
  262. data/data/problems/428.yml +16 -19
  263. data/data/problems/430.yml +4 -5
  264. data/data/problems/44.yml +3 -3
  265. data/data/problems/45.yml +2 -2
  266. data/data/problems/46.yml +8 -8
  267. data/data/problems/47.yml +6 -10
  268. data/data/problems/53.yml +8 -9
  269. data/data/problems/56.yml +1 -1
  270. data/data/problems/57.yml +5 -5
  271. data/data/problems/58.yml +1 -1
  272. data/data/problems/6.yml +1 -1
  273. data/data/problems/61.yml +4 -4
  274. data/data/problems/64.yml +39 -46
  275. data/data/problems/65.yml +13 -14
  276. data/data/problems/66.yml +10 -10
  277. data/data/problems/68.yml +4 -5
  278. data/data/problems/69.yml +2 -2
  279. data/data/problems/70.yml +3 -4
  280. data/data/problems/71.yml +3 -3
  281. data/data/problems/72.yml +3 -3
  282. data/data/problems/73.yml +3 -3
  283. data/data/problems/74.yml +15 -22
  284. data/data/problems/75.yml +1 -1
  285. data/data/problems/8.yml +14 -14
  286. data/data/problems/81.yml +7 -7
  287. data/data/problems/82.yml +4 -4
  288. data/data/problems/83.yml +4 -4
  289. data/data/problems/85.yml +1 -1
  290. data/data/problems/86.yml +8 -8
  291. data/data/problems/88.yml +22 -27
  292. data/data/problems/9.yml +6 -6
  293. data/data/problems/90.yml +13 -13
  294. data/data/problems/91.yml +8 -8
  295. data/data/problems/92.yml +7 -9
  296. data/data/problems/93.yml +9 -10
  297. data/data/problems/95.yml +1 -1
  298. data/data/problems/96.yml +17 -17
  299. data/data/problems/97.yml +2 -2
  300. data/data/problems/99.yml +2 -2
  301. data/lib/euler/problem.rb +6 -1
  302. data/lib/euler/version.rb +1 -1
  303. metadata +2 -2
@@ -5,14 +5,14 @@
5
5
  :content: "In a triangular array of positive and negative integers, we wish to find
6
6
  a sub-triangle such that the sum of the numbers it contains is the smallest possible.\n\nIn
7
7
  the example below, it can be easily verified that the marked triangle satisfies
8
- this condition having a sum of ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)42.\n\n
9
- ![](/home/will/src/euler-manager/config/../data/images/p_150.gif)\n\nWe wish to
10
- make such a triangular array with one thousand rows, so we generate 500500 pseudo-random
11
- numbers s<sub>k</sub> in the range ![±](/home/will/src/euler-manager/config/../data/images/symbol_plusmn.gif)2<sup>19</sup>,
12
- using a type of random number generator (known as a Linear Congruential Generator)
13
- as follows:\n\nt := 0\r \n\rfor k = 1 up to k = 500500:\r \n\r    t := (615949\\*t
14
- + 797807) modulo 2<sup>20</sup> \n\r    s<sub>k</sub> := t ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2<sup>19</sup>\n\nThus:
15
- s<sub>1</sub> = 273519, s<sub>2</sub> = ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)153582,
8
+ this condition having a sum of ![−]({{ images_dir }}/symbol_minus.gif)42.\n\n ![]({{
9
+ images_dir }}/p_150.gif)\n\nWe wish to make such a triangular array with one thousand
10
+ rows, so we generate 500500 pseudo-random numbers s<sub>k</sub> in the range ![±]({{
11
+ images_dir }}/symbol_plusmn.gif)2<sup>19</sup>, using a type of random number generator
12
+ (known as a Linear Congruential Generator) as follows:\n\nt := 0\r \n\rfor k =
13
+ 1 up to k = 500500:\r \n\r    t := (615949\\*t + 797807) modulo 2<sup>20</sup>
14
+ \ \n\r    s<sub>k</sub> := t ![−]({{ images_dir }}/symbol_minus.gif)2<sup>19</sup>\n\nThus:
15
+ s<sub>1</sub> = 273519, s<sub>2</sub> = ![−]({{ images_dir }}/symbol_minus.gif)153582,
16
16
  s<sub>3</sub> = 450905 etc\n\nOur triangular array is then formed using the pseudo-random
17
17
  numbers thus:\n\n\rs<sub>1</sub> \n\rs<sub>2</sub>  s<sub>3</sub> \n\rs<sub>4</sub> 
18
18
  s<sub>5</sub>  s<sub>6</sub>  \r \n\rs<sub>7</sub>  s<sub>8</sub>  s<sub>9</sub> 
@@ -11,7 +11,7 @@
11
11
 
12
12
  All the unused sheets are placed back in the envelope.
13
13
 
14
- ![](/home/will/src/euler-manager/config/../data/images/p_151.gif)
14
+ ![]({{ images_dir }}/p_151.gif)
15
15
 
16
16
  At the beginning of each subsequent batch, he takes from the envelope one sheet of paper at random. If it is of size A5, he uses it. If it is larger, he repeats the 'cut-in-half' procedure until he has what he needs and any remaining sheets are always placed back in the envelope.
17
17
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  For instance, the numbers {2,3,4,5,7,12,15,20,28,35} can be used:
9
9
 
10
- ![](/home/will/src/euler-manager/config/../data/images/p_152_sum.gif)
10
+ ![]({{ images_dir }}/p_152_sum.gif)
11
11
 
12
12
  In fact, only using integers between 2 and 45 inclusive, there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45} and {2,3,4,6,7,9,12,15,28,30,35,36,45}.
13
13
 
@@ -9,34 +9,32 @@
9
9
  <var>x</var>=3+2<var>i</var> and <var>x</var>=3-2<var>i</var>.\r \n<var>x</var>=3+2<var>i</var>
10
10
  and <var>x</var>=3-2<var>i</var> are called each others' complex conjugate.\r \n\rNumbers
11
11
  of the form <var>a</var>+<var>bi</var> are called complex numbers.\r \n\rIn general
12
- <var>a</var>+<var>bi</var> and <var>a</var> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)<var>bi</var>
12
+ <var>a</var>+<var>bi</var> and <var>a</var> ![−]({{ images_dir }}/symbol_minus.gif)<var>bi</var>
13
13
  are each other's complex conjugate.\n\nA Gaussian Integer is a complex number <var>a</var>+<var>bi</var>
14
14
  such that both <var>a</var> and <var>b</var> are integers.\r \n\rThe regular integers
15
15
  are also Gaussian integers (with <var>b</var>=0).\r \n\rTo distinguish them from
16
- Gaussian integers with <var>b</var> ![≠](/home/will/src/euler-manager/config/../data/images/symbol_ne.gif)
17
- 0 we call such integers \"rational integers.\"\r \n\rA Gaussian integer is called
18
- a divisor of a rational integer <var>n</var> if the result is also a Gaussian integer.\r
19
- \ \n\rIf for example we divide 5 by 1+2<var>i</var> we can simplify ![](/home/will/src/euler-manager/config/../data/images/p_153_formule1.gif)
16
+ Gaussian integers with <var>b</var> ![≠]({{ images_dir }}/symbol_ne.gif) 0 we call
17
+ such integers \"rational integers.\"\r \n\rA Gaussian integer is called a divisor
18
+ of a rational integer <var>n</var> if the result is also a Gaussian integer.\r \n\rIf
19
+ for example we divide 5 by 1+2<var>i</var> we can simplify ![]({{ images_dir }}/p_153_formule1.gif)
20
20
  in the following manner:\r \n\rMultiply numerator and denominator by the complex
21
- conjugate of 1+2<var>i</var>: 1 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2<var>i</var>.\r
22
- \ \n\rThe result is \r ![](/home/will/src/euler-manager/config/../data/images/p_153_formule2.gif).\r
23
- \ \n\rSo 1+2<var>i</var> is a divisor of 5.\r \n\rNote that 1+<var>i</var> is not
24
- a divisor of 5 because ![](/home/will/src/euler-manager/config/../data/images/p_153_formule5.gif).\r
25
- \ \n\rNote also that if the Gaussian Integer (<var>a</var>+<var>bi</var>) is a divisor
26
- of a rational integer <var>n</var>, then its complex conjugate (<var>a</var> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)<var>bi</var>)
21
+ conjugate of 1+2<var>i</var>: 1 ![−]({{ images_dir }}/symbol_minus.gif)2<var>i</var>.\r
22
+ \ \n\rThe result is \r ![]({{ images_dir }}/p_153_formule2.gif).\r \n\rSo 1+2<var>i</var>
23
+ is a divisor of 5.\r \n\rNote that 1+<var>i</var> is not a divisor of 5 because
24
+ ![]({{ images_dir }}/p_153_formule5.gif).\r \n\rNote also that if the Gaussian
25
+ Integer (<var>a</var>+<var>bi</var>) is a divisor of a rational integer <var>n</var>,
26
+ then its complex conjugate (<var>a</var> ![−]({{ images_dir }}/symbol_minus.gif)<var>bi</var>)
27
27
  is also a divisor of <var>n</var>.\n\nIn fact, 5 has six divisors such that the
28
- real part is positive: {1, 1 + 2<var>i</var>, 1 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
29
- 2<var>i</var>, 2 + <var>i</var>, 2 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
30
- <var>i</var>, 5}.\r \n\rThe following is a table of all of the divisors for the
31
- first five positive rational integers:\n\n| <var>n</var> | Gaussian integer divisors
32
- \ \n\rwith positive real part | Sum s(<var>n</var>) of \nthese\r\rdivisors |\n|
33
- 1 | 1 | 1 |\n| 2 | 1, 1+<var>i</var>, 1-<var>i</var>, 2 | 5 |\n| 3 | 1, 3 | 4 |\n|
34
- 4 | 1, 1+<var>i</var>, 1-<var>i</var>, 2, 2+2<var>i</var>, 2-2<var>i</var>,4 | 13
35
- |\n| 5 | 1, 1+2<var>i</var>, 1-2<var>i</var>, 2+<var>i</var>, 2-<var>i</var>, 5
36
- | 12 |\n\nFor divisors with positive real parts, then, we have: ![](/home/will/src/euler-manager/config/../data/images/p_153_formule6.gif).\n\nFor
37
- 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
38
- ![](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>5</sup>,
39
- ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) s(<var>n</var>)=17924657155.\n\nWhat
40
- is ![](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) s(<var>n</var>)
41
- for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
42
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10<sup>8</sup>?\n\n"
28
+ real part is positive: {1, 1 + 2<var>i</var>, 1 ![−]({{ images_dir }}/symbol_minus.gif)
29
+ 2<var>i</var>, 2 + <var>i</var>, 2 ![−]({{ images_dir }}/symbol_minus.gif) <var>i</var>,
30
+ 5}.\r \n\rThe following is a table of all of the divisors for the first five positive
31
+ rational integers:\n\n| <var>n</var> | Gaussian integer divisors \n\rwith positive
32
+ real part | Sum s(<var>n</var>) of \nthese\r\rdivisors |\n| 1 | 1 | 1 |\n| 2 |
33
+ 1, 1+<var>i</var>, 1-<var>i</var>, 2 | 5 |\n| 3 | 1, 3 | 4 |\n| 4 | 1, 1+<var>i</var>,
34
+ 1-<var>i</var>, 2, 2+2<var>i</var>, 2-2<var>i</var>,4 | 13 |\n| 5 | 1, 1+2<var>i</var>,
35
+ 1-2<var>i</var>, 2+<var>i</var>, 2-<var>i</var>, 5 | 12 |\n\nFor divisors with positive
36
+ real parts, then, we have: ![]({{ images_dir }}/p_153_formule6.gif).\n\nFor 1 ![≤]({{
37
+ images_dir }}/symbol_le.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 10<sup>5</sup>,
38
+ ![]({{ images_dir }}/symbol_sum.gif) s(<var>n</var>)=17924657155.\n\nWhat is ![∑]({{
39
+ images_dir }}/symbol_sum.gif) s(<var>n</var>) for 1 ![≤]({{ images_dir }}/symbol_le.gif)
40
+ <var>n</var> ![]({{ images_dir }}/symbol_le.gif) 10<sup>8</sup>?\n\n"
@@ -3,12 +3,13 @@
3
3
  :name: Exploring Pascal's pyramid
4
4
  :url: http://projecteuler.net/problem=154
5
5
  :content: "A triangular pyramid is constructed using spherical balls so that each
6
- ball rests on exactly three balls of the next lower level.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_154_pyramid.gif)\n\nThen,
7
- we calculate the number of paths leading from the apex to each position:\n\nA path
8
- starts at the apex and progresses downwards to any of the three spheres directly
9
- below the current position.\n\nConsequently, the number of paths to reach a certain
10
- position is the sum of the numbers immediately above it (depending on the position,
11
- there are up to three numbers above it).\n\nThe result is _Pascal's pyramid_ and
12
- the numbers at each level <var>n</var> are the coefficients of the trinomial expansion
13
- \r(<var>x + y + z</var>)<sup><var>n</var></sup>.\n\nHow many coefficients in the
14
- expansion of (<var>x + y + z</var>)<sup>200000</sup> are multiples of 10<sup>12</sup>?\n\n"
6
+ ball rests on exactly three balls of the next lower level.\n\n ![]({{ images_dir
7
+ }}/p_154_pyramid.gif)\n\nThen, we calculate the number of paths leading from the
8
+ apex to each position:\n\nA path starts at the apex and progresses downwards to
9
+ any of the three spheres directly below the current position.\n\nConsequently, the
10
+ number of paths to reach a certain position is the sum of the numbers immediately
11
+ above it (depending on the position, there are up to three numbers above it).\n\nThe
12
+ result is _Pascal's pyramid_ and the numbers at each level <var>n</var> are the
13
+ coefficients of the trinomial expansion \r(<var>x + y + z</var>)<sup><var>n</var></sup>.\n\nHow
14
+ many coefficients in the expansion of (<var>x + y + z</var>)<sup>200000</sup> are
15
+ multiples of 10<sup>12</sup>?\n\n"
@@ -8,12 +8,12 @@
8
8
  sub-units to form larger sub-units, and so on up to a final circuit.\n\nUsing this
9
9
  simple procedure and up to <var>n</var> identical capacitors, we can make circuits
10
10
  having a range of different total capacitances. For example, using up to <var>n</var>=3
11
- capacitors of 60 ![](/home/will/src/euler-manager/config/../data/images/p_155_capsmu.gif)F
12
- each, we can obtain the following 7 distinct total capacitance values:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_155_capacitors1.gif)\n\nIf
11
+ capacitors of 60 ![]({{ images_dir }}/p_155_capsmu.gif)F each, we can obtain the
12
+ following 7 distinct total capacitance values:\n\n ![]({{ images_dir }}/p_155_capacitors1.gif)\n\nIf
13
13
  we denote by <var>D</var>(<var>n</var>) the number of distinct total capacitance
14
14
  values we can obtain when using up to <var>n</var> equal-valued capacitors and the
15
15
  simple procedure described above, we have: <var>D</var>(1)=1, <var>D</var>(2)=3,
16
16
  <var>D</var>(3)=7 ...\n\nFind <var>D</var>(18).\n\n_Reminder :_ When connecting
17
17
  capacitors C<sub>1</sub>, C<sub>2</sub> etc in parallel, the total capacitance is
18
18
  C<sub>T</sub> = C<sub>1</sub> + C<sub>2</sub> +...,\r \n\rwhereas when connecting
19
- them in series, the overall capacitance is given by:\r ![](/home/will/src/euler-manager/config/../data/images/p_155_capsform.gif)\n\n"
19
+ them in series, the overall capacitance is given by:\r ![]({{ images_dir }}/p_155_capsform.gif)\n\n"
@@ -14,12 +14,11 @@
14
14
  are <var>n</var>=0 and <var>n</var>=1. The next solution is <var>n</var>=199981.\n\nIn
15
15
  the same manner the function <var>f</var>(<var>n,d</var>) gives the total number
16
16
  of digits <var>d</var> that have been written down after the number <var>n</var>
17
- has been written.\r \n\rIn fact, for every digit <var>d</var> ![≠](/home/will/src/euler-manager/config/../data/images/symbol_ne.gif)
18
- 0, 0 is the first solution of the equation <var>f</var>(<var>n,d</var>)=<var>n</var>.\n\nLet
17
+ has been written.\r \n\rIn fact, for every digit <var>d</var> ![≠]({{ images_dir
18
+ }}/symbol_ne.gif) 0, 0 is the first solution of the equation <var>f</var>(<var>n,d</var>)=<var>n</var>.\n\nLet
19
19
  <var>s</var>(<var>d</var>) be the sum of all the solutions for which <var>f</var>(<var>n,d</var>)=<var>n</var>.\r
20
- \ \n\rYou are given that <var>s</var>(1)=22786974071.\n\nFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)
21
- <var>s</var>(<var>d</var>) for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
22
- d ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 9.\n\nNote:
23
- if, for some <var>n</var>, <var>f</var>(<var>n,d</var>)=<var>n</var>\r for more
24
- than one value of <var>d</var> this value of <var>n</var> is counted again for every
25
- value of <var>d</var> for which <var>f</var>(<var>n,d</var>)=<var>n</var>.\n\n"
20
+ \ \n\rYou are given that <var>s</var>(1)=22786974071.\n\nFind ![∑]({{ images_dir
21
+ }}/symbol_sum.gif) <var>s</var>(<var>d</var>) for 1 ![≤]({{ images_dir }}/symbol_le.gif)
22
+ d ![≤]({{ images_dir }}/symbol_le.gif) 9.\n\nNote: if, for some <var>n</var>, <var>f</var>(<var>n,d</var>)=<var>n</var>\r
23
+ for more than one value of <var>d</var> this value of <var>n</var> is counted again
24
+ for every value of <var>d</var> for which <var>f</var>(<var>n,d</var>)=<var>n</var>.\n\n"
@@ -5,7 +5,7 @@
5
5
  :url: http://projecteuler.net/problem=157
6
6
  :content: "Consider the diophantine equation <sup>1</sup>/<sub><var>a</var></sub>+<sup>1</sup>/<sub><var>b</var></sub>=
7
7
  <sup><var>p</var></sup>/<sub>10<sup><var>n</var></sup></sub> with <var>a, b, p,
8
- n</var> positive integers and <var>a</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
+ n</var> positive integers and <var>a</var> ![≤]({{ images_dir }}/symbol_le.gif)
9
9
  <var>b</var>. \n\rFor <var>n</var>=1 this equation has 20 solutions that are listed
10
10
  below:\n\n| <sup>1</sup>/<sub>1</sub>+<sup>1</sup>/<sub>1</sub>=<sup>20</sup>/<sub>10</sub>
11
11
  | <sup>1</sup>/<sub>1</sub>+<sup>1</sup>/<sub>2</sub>=<sup>15</sup>/<sub>10</sub>
@@ -27,6 +27,5 @@
27
27
  | <sup>1</sup>/<sub>14</sub>+<sup>1</sup>/<sub>35</sub>=<sup>1</sup>/<sub>10</sub>
28
28
  | <sup>1</sup>/<sub>15</sub>+<sup>1</sup>/<sub>30</sub>=<sup>1</sup>/<sub>10</sub>
29
29
  | <sup>1</sup>/<sub>20</sub>+<sup>1</sup>/<sub>20</sub>=<sup>1</sup>/<sub>10</sub>
30
- |\n\nHow many solutions has this equation for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
31
- <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
32
- 9?\n\n"
30
+ |\n\nHow many solutions has this equation for 1 ![≤]({{ images_dir }}/symbol_le.gif)
31
+ <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 9?\n\n"
@@ -11,8 +11,7 @@
11
11
  'zyx' there are zero characters that come lexicographically after its neighbour
12
12
  to the left. \n\rIn all there are 10400 strings of length 3 for which exactly one
13
13
  character comes lexicographically after its neighbour to the left.\n\nWe now consider
14
- strings of <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
15
- 26 different characters from the alphabet. \n \rFor every <var>n</var>, p(<var>n</var>)
16
- is the number of strings of length <var>n</var> for which exactly one character
17
- comes lexicographically after its neighbour to the left.\n\nWhat is the maximum
18
- value of p(<var>n</var>)?\n\n"
14
+ strings of <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 26 different characters
15
+ from the alphabet. \n \rFor every <var>n</var>, p(<var>n</var>) is the number of
16
+ strings of length <var>n</var> for which exactly one character comes lexicographically
17
+ after its neighbour to the left.\n\nWhat is the maximum value of p(<var>n</var>)?\n\n"
@@ -14,6 +14,6 @@
14
14
  \n2x2x2x3\n | \n9\n |\n| \n2x3x4\n | \n9\n |\n| \n2x2x6\n | \n10\n |\n| \n4x6\n
15
15
  | \n10\n |\n| \n3x8\n | \n11\n |\n| \n2x12\n | \n5\n |\n| \n24\n | \n6\n |\n\nThe
16
16
  maximum Digital Root Sum of 24 is 11. \n\rThe function mdrs(<var>n</var>) gives
17
- the maximum Digital Root Sum of <var>n</var>. So mdrs(24)=11. \n\rFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)mdrs(<var>n</var>)
18
- for 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>n</var>
19
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 1,000,000.\n\n"
17
+ the maximum Digital Root Sum of <var>n</var>. So mdrs(24)=11. \n\rFind ![∑]({{
18
+ images_dir }}/symbol_sum.gif)mdrs(<var>n</var>) for 1 ![<]({{ images_dir }}/symbol_lt.gif)
19
+ <var>n</var> ![<]({{ images_dir }}/symbol_lt.gif) 1,000,000.\n\n"
@@ -3,9 +3,10 @@
3
3
  :name: Triominoes
4
4
  :url: http://projecteuler.net/problem=161
5
5
  :content: "A triomino is a shape consisting of three squares joined via the edges.\rThere
6
- are two basic forms:\n\n![](/home/will/src/euler-manager/config/../data/images/p_161_trio1.gif)\n\nIf
7
- all possible orientations are taken into account there are six:\n\n![](/home/will/src/euler-manager/config/../data/images/p_161_trio3.gif)\n\nAny
6
+ are two basic forms:\n\n![]({{ images_dir }}/p_161_trio1.gif)\n\nIf all possible
7
+ orientations are taken into account there are six:\n\n![]({{ images_dir }}/p_161_trio3.gif)\n\nAny
8
8
  n by m grid for which nxm is divisible by 3 can be tiled with triominoes. \n\rIf
9
9
  we consider tilings that can be obtained by reflection or rotation from another
10
- tiling as different there are 41 ways a 2 by 9 grid can be tiled with triominoes:\n\n![](/home/will/src/euler-manager/config/../data/images/p_161_k9.gif)\n\nIn
11
- how many ways can a 9 by 12 grid be tiled in this way by triominoes?\n\n"
10
+ tiling as different there are 41 ways a 2 by 9 grid can be tiled with triominoes:\n\n![]({{
11
+ images_dir }}/p_161_k9.gif)\n\nIn how many ways can a 9 by 12 grid be tiled in this
12
+ way by triominoes?\n\n"
@@ -4,14 +4,14 @@
4
4
  :url: http://projecteuler.net/problem=163
5
5
  :content: "Consider an equilateral triangle in which straight lines are drawn from
6
6
  each vertex to the middle of the opposite side, such as in the _size 1_ triangle
7
- in the sketch below.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_163.gif)\n\nSixteen
7
+ in the sketch below.\n\n ![]({{ images_dir }}/p_163.gif)\n\nSixteen triangles of
8
+ either different shape or size or orientation or location can now be observed in
9
+ that triangle. Using _size 1_ triangles as building blocks, larger triangles can
10
+ be formed, such as the _size 2_ triangle in the above sketch. One-hundred and four
8
11
  triangles of either different shape or size or orientation or location can now be
9
- observed in that triangle. Using _size 1_ triangles as building blocks, larger triangles
10
- can be formed, such as the _size 2_ triangle in the above sketch. One-hundred and
11
- four triangles of either different shape or size or orientation or location can
12
- now be observed in that _size 2_ triangle.\n\nIt can be observed that the _size
13
- 2_ triangle contains 4 _size 1_ triangle building blocks. A _size 3_ triangle would
14
- contain 9 _size 1_ triangle building blocks and a _size n_ triangle would thus contain
15
- _n<sup>2</sup> size 1_ triangle building blocks.\n\nIf we denote T(<var>n</var>)
16
- as the number of triangles present in a triangle of _size <var>n</var>_, then\n\nT(1)
17
- = 16 \n\rT(2) = 104\n\nFind T(36).\n\n"
12
+ observed in that _size 2_ triangle.\n\nIt can be observed that the _size 2_ triangle
13
+ contains 4 _size 1_ triangle building blocks. A _size 3_ triangle would contain
14
+ 9 _size 1_ triangle building blocks and a _size n_ triangle would thus contain _n<sup>2</sup>
15
+ size 1_ triangle building blocks.\n\nIf we denote T(<var>n</var>) as the number
16
+ of triangles present in a triangle of _size <var>n</var>_, then\n\nT(1) = 16 \n\rT(2)
17
+ = 104\n\nFind T(36).\n\n"
@@ -20,7 +20,7 @@
20
20
  have no common point. So among the three line segments, we find one true intersection
21
21
  point.\n\nNow let us do the same for 5000 line segments. To this end, we generate
22
22
  20000 numbers using the so-called \"Blum Blum Shub\" pseudo-random number generator.\n\ns<sub>0</sub>
23
- = 290797 \n \n \n\rs<sub>n+1</sub> = s<sub>n</sub> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)s<sub>n</sub>
23
+ = 290797 \n \n \n\rs<sub>n+1</sub> = s<sub>n</sub> ![×]({{ images_dir }}/symbol_times.gif)s<sub>n</sub>
24
24
  (modulo 50515093) \n \n \n\rt<sub>n</sub> = s<sub>n</sub> (modulo 500)\n\nTo
25
25
  create each line segment, we use four consecutive numbers t<sub>n</sub>. That is,
26
26
  the first line segment is given by:\n\n(t<sub>1</sub>, t<sub>2</sub>) to (t<sub>3</sub>,
@@ -2,10 +2,10 @@
2
2
  :id: 166
3
3
  :name: Criss Cross
4
4
  :url: http://projecteuler.net/problem=166
5
- :content: "A 4x4 grid is filled with digits d, 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
6
- d ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 9.\n\nIt
7
- can be seen that in the grid\n\n6 3 3 0 \n\r5 0 4 3 \n\r0 7 1 4 \n\r1 2 4 5\n\nthe
8
- sum of each row and each column has the value 12. Moreover the sum of each diagonal
9
- is also 12.\n\nIn how many ways can you fill a 4x4 grid with the digits d, 0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
10
- d ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 9 so that
11
- each row, each column, and both diagonals have the same sum?\n\n"
5
+ :content: "A 4x4 grid is filled with digits d, 0 ![≤]({{ images_dir }}/symbol_le.gif)
6
+ d ![≤]({{ images_dir }}/symbol_le.gif) 9.\n\nIt can be seen that in the grid\n\n6
7
+ 3 3 0 \n\r5 0 4 3 \n\r0 7 1 4 \n\r1 2 4 5\n\nthe sum of each row and each column
8
+ has the value 12. Moreover the sum of each diagonal is also 12.\n\nIn how many ways
9
+ can you fill a 4x4 grid with the digits d, 0 ![≤]({{ images_dir }}/symbol_le.gif)
10
+ d ![≤]({{ images_dir }}/symbol_le.gif) 9 so that each row, each column, and both
11
+ diagonals have the same sum?\n\n"
@@ -9,7 +9,6 @@
9
9
  example, the sequence U(1,2) begins with \n\r1, 2, 3 = 1 + 2, 4 = 1 + 3, 6 = 2
10
10
  + 4, 8 = 2 + 6, 11 = 3 + 8; \n\r5 does not belong to it because 5 = 1 + 4 = 2 +
11
11
  3 has two representations as the sum of two previous members, likewise 7 = 1 + 6
12
- = 3 + 4.\n\nFind ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)U(2,2<var>n</var>+1)<sub><var>k</var></sub>
13
- for 2 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var>
14
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)10, where
15
- <var>k</var> = 10<sup>11</sup>.\n\n"
12
+ = 3 + 4.\n\nFind ![∑]({{ images_dir }}/symbol_sum.gif)U(2,2<var>n</var>+1)<sub><var>k</var></sub>
13
+ for 2 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)10,
14
+ where <var>k</var> = 10<sup>11</sup>.\n\n"
@@ -4,8 +4,8 @@
4
4
  :url: http://projecteuler.net/problem=168
5
5
  :content: "Consider the number 142857. We can right-rotate this number by moving the
6
6
  last digit (7) to the front of it, giving us 714285. \n\rIt can be verified that
7
- 714285=5 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)142857.
8
- \ \n\rThis demonstrates an unusual property of 142857: it is a divisor of its right-rotation.\n\nFind
9
- the last 5 digits of the sum of all integers <var>n</var>, 10 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
10
- <var>n</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
11
- 10<sup>100</sup>, that have this property.\n\n"
7
+ 714285=5 ![×]({{ images_dir }}/symbol_times.gif)142857. \n\rThis demonstrates an
8
+ unusual property of 142857: it is a divisor of its right-rotation.\n\nFind the last
9
+ 5 digits of the sum of all integers <var>n</var>, 10 ![<]({{ images_dir }}/symbol_lt.gif)
10
+ <var>n</var> ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>100</sup>, that have this
11
+ property.\n\n"
@@ -2,8 +2,8 @@
2
2
  :id: 170
3
3
  :name: Find the largest 0 to 9 pandigital that can be formed by concatenating products
4
4
  :url: http://projecteuler.net/problem=170
5
- :content: "Take the number 6 and multiply it by each of 1273 and 9854:\n\n6 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
6
- 1273 = 7638 \n\r6 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
5
+ :content: "Take the number 6 and multiply it by each of 1273 and 9854:\n\n6 ![×]({{
6
+ images_dir }}/symbol_times.gif) 1273 = 7638 \n\r6 ![×]({{ images_dir }}/symbol_times.gif)
7
7
  9854 = 59124\n\nBy concatenating these products we get the 1 to 9 pandigital 763859124.
8
8
  We will call 763859124 the \"concatenated product of 6 and (1273,9854)\". Notice
9
9
  too, that the concatenation of the input numbers, 612739854, is also 1 to 9 pandigital.\n\nThe
@@ -6,6 +6,6 @@
6
6
  the squares of the digits (in base 10) of <var>n</var>, e.g.\n\nf(3) = 3<sup>2</sup>
7
7
  = 9, \n\rf(25) = 2<sup>2</sup> + 5<sup>2</sup> = 4 + 25 = 29, \n\rf(442) = 4<sup>2</sup>
8
8
  + 4<sup>2</sup> + 2<sup>2</sup> = 16 + 16 + 4 = 36\n\nFind the last nine digits
9
- of the sum of all <var>n</var>, 0 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
10
- <var>n</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
11
- 10<sup>20</sup>, such that f(<var>n</var>) is a perfect square.\n\n"
9
+ of the sum of all <var>n</var>, 0 ![<]({{ images_dir }}/symbol_lt.gif) <var>n</var>
10
+ ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>20</sup>, such that f(<var>n</var>)
11
+ is a perfect square.\n\n"
@@ -6,7 +6,7 @@
6
6
  :content: |+
7
7
  We shall define a square lamina to be a square outline with a square "hole" so that the shape possesses vertical and horizontal symmetry. For example, using exactly thirty-two square tiles we can form two different square laminae:
8
8
 
9
- ![](/home/will/src/euler-manager/config/../data/images/p_173_square_laminas.gif)
9
+ ![]({{ images_dir }}/p_173_square_laminas.gif)
10
10
 
11
11
  With one-hundred tiles, and not necessarily using all of the tiles at one time, it is possible to form forty-one different square laminae.
12
12
 
@@ -8,11 +8,11 @@
8
8
 
9
9
  Given eight tiles it is possible to form a lamina in only one way: 3x3 square with a 1x1 hole in the middle. However, using thirty-two tiles it is possible to form two distinct laminae.
10
10
 
11
- ![](/home/will/src/euler-manager/config/../data/images/p_173_square_laminas.gif)
11
+ ![]({{ images_dir }}/p_173_square_laminas.gif)
12
12
 
13
13
  If <var>t</var> represents the number of tiles used, we shall say that <var>t</var> = 8 is type L(1) and <var>t</var> = 32 is type L(2).
14
14
 
15
- Let N(<var>n</var>) be the number of <var>t</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1000000 such that <var>t</var> is type L(<var>n</var>); for example, N(15) = 832.
15
+ Let N(<var>n</var>) be the number of <var>t</var> ![≤]({{ images_dir }}/symbol_le.gif) 1000000 such that <var>t</var> is type L(<var>n</var>); for example, N(15) = 832.
16
16
 
17
- What is ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif) N(<var>n</var>) for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10?
17
+ What is ![∑]({{ images_dir }}/symbol_sum.gif) N(<var>n</var>) for 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 10?
18
18
 
@@ -7,10 +7,10 @@
7
7
  as a sum of powers of 2 where no power occurs more than twice. \n \n \n\r\rFor
8
8
  example, f(10)=5 since there are five different ways to express 10: \n10 = 8+2
9
9
  = 8+1+1 = 4+4+2 = 4+2+2+1+1 = 4+4+1+1 \n \n \n\r\rIt can be shown that for every
10
- fraction <var>p/q</var> (<var>p</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)0,
11
- <var>q</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)0)
12
- there exists at least one integer <var>n</var> such that \n f(<var>n</var>)/f(<var>n</var>-1)=<var>p/q</var>.
13
- \ \n \n \n\rFor instance, the smallest <var>n</var> for which f(<var>n</var>)/f(<var>n</var>-1)=13/17
10
+ fraction <var>p/q</var> (<var>p</var> ![>]({{ images_dir }}/symbol_gt.gif)0, <var>q</var>
11
+ ![>]({{ images_dir }}/symbol_gt.gif)0) there exists at least one integer <var>n</var>
12
+ such that \n f(<var>n</var>)/f(<var>n</var>-1)=<var>p/q</var>. \n \n \n\rFor
13
+ instance, the smallest <var>n</var> for which f(<var>n</var>)/f(<var>n</var>-1)=13/17
14
14
  is 241. \n\rThe binary expansion of 241 is 11110001. \n\rReading this binary number
15
15
  from the most significant bit to the least significant bit there are 4 one's, 3
16
16
  zeroes and 1 one. We shall call the string 4,3,1 the Shortened Binary Expansion
@@ -5,7 +5,7 @@
5
5
  :content: |+
6
6
  Let ABCD be a convex quadrilateral, with diagonals AC and BD. At each vertex the diagonal makes an angle with each of the two sides, creating eight corner angles.
7
7
 
8
- ![](/home/will/src/euler-manager/config/../data/images/p_177_quad.gif)
8
+ ![]({{ images_dir }}/p_177_quad.gif)
9
9
 
10
10
  For example, at vertex A, the two angles are CAD, CAB.
11
11
 
@@ -3,5 +3,5 @@
3
3
  :name: Consecutive positive divisors
4
4
  :url: http://projecteuler.net/problem=179
5
5
  :content: |+
6
- Find the number of integers 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) n ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 10<sup>7</sup>, for which <var>n</var> and <var>n</var> + 1 have the same number of positive divisors. For example, 14 has the positive divisors 1, 2, 7, 14 while 15 has 1, 3, 5, 15.
6
+ Find the number of integers 1 ![<]({{ images_dir }}/symbol_lt.gif) n ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>7</sup>, for which <var>n</var> and <var>n</var> + 1 have the same number of positive divisors. For example, 14 has the positive divisors 1, 2, 7, 14 while 15 has 1, 3, 5, 15.
7
7
 
@@ -4,23 +4,22 @@
4
4
  :url: http://projecteuler.net/problem=180
5
5
  :content: "For any integer <var>n</var>, consider the three functions\n\n<var>f</var><sub>1,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
6
6
  = <var>x</var><sup><var>n</var>+1</sup> + <var>y</var><sup><var>n</var>+1</sup>
7
- ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) <var>z</var><sup><var>n</var>+1</sup>
8
- \ \n<var>f</var><sub>2,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
7
+ ![−]({{ images_dir }}/symbol_minus.gif) <var>z</var><sup><var>n</var>+1</sup> \n<var>f</var><sub>2,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
9
8
  = (<var>xy</var> + <var>yz</var> + <var>zx</var>)\\*(<var>x</var><sup><var>n</var>-1</sup>
10
- + <var>y</var><sup><var>n</var>-1</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
9
+ + <var>y</var><sup><var>n</var>-1</sup> ![−]({{ images_dir }}/symbol_minus.gif)
11
10
  <var>z</var><sup><var>n</var>-1</sup>) \n<var>f</var><sub>3,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
12
11
  = <var>xyz</var>\\*(<var>x</var><sup><var>n</var>-2</sup> + <var>y</var><sup><var>n</var>-2</sup>
13
- ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) <var>z</var><sup><var>n</var>-2</sup>)\n\nand
12
+ ![−]({{ images_dir }}/symbol_minus.gif) <var>z</var><sup><var>n</var>-2</sup>)\n\nand
14
13
  their combination\n\n<var>f</var><sub><var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
15
14
  = <var>f</var><sub>1,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
16
15
  + <var>f</var><sub>2,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
17
- ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) <var>f</var><sub>3,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)\n\nWe
16
+ ![−]({{ images_dir }}/symbol_minus.gif) <var>f</var><sub>3,<var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)\n\nWe
18
17
  call (<var>x</var>,<var>y</var>,<var>z</var>) a golden triple of order <var>k</var>
19
18
  if <var>x</var>, <var>y</var>, and <var>z</var> are all rational numbers of the
20
- form <var>a</var> / <var>b</var> with \n\r0 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
21
- <var>a</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
22
- <var>b</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
23
- <var>k</var> and there is (at least) one integer <var>n</var>, so that <var>f</var><sub><var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
19
+ form <var>a</var> / <var>b</var> with \n\r0 ![<]({{ images_dir }}/symbol_lt.gif)
20
+ <var>a</var> ![<]({{ images_dir }}/symbol_lt.gif) <var>b</var> ![≤]({{ images_dir
21
+ }}/symbol_le.gif) <var>k</var> and there is (at least) one integer <var>n</var>,
22
+ so that <var>f</var><sub><var>n</var></sub>(<var>x</var>,<var>y</var>,<var>z</var>)
24
23
  = 0.\n\nLet <var>s</var>(<var>x</var>,<var>y</var>,<var>z</var>) = <var>x</var>
25
24
  + <var>y</var> + <var>z</var>. \n\rLet <var>t</var> = <var>u</var> / <var>v</var>
26
25
  be the sum of all distinct <var>s</var>(<var>x</var>,<var>y</var>,<var>z</var>)
@@ -4,27 +4,25 @@
4
4
  :url: http://projecteuler.net/problem=182
5
5
  :content: "The RSA encryption is based on the following procedure:\n\nGenerate two
6
6
  distinct primes <var>p</var> and <var>q</var>. \nCompute <var>n=pq</var> and φ=(<var>p</var>-1)(<var>q</var>-1).
7
- \ \n\rFind an integer <var>e</var>, 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>e</var>
8
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)φ, such that
9
- gcd(<var>e</var>,φ)=1.\n\nA message in this system is a number in the interval [0,<var>n</var>-1].
10
- \ \n\rA text to be encrypted is then somehow converted to messages (numbers in the
11
- interval [0,<var>n</var>-1]). \n\rTo encrypt the text, for each message, <var>m</var>,
12
- <var>c</var>=<var>m</var><sup><var>e</var></sup> mod <var>n</var> is calculated.\n\nTo
13
- decrypt the text, the following procedure is needed: calculate <var>d</var> such
14
- that <var>ed</var>=1 mod φ, then for each encrypted message, <var>c</var>, calculate
15
- <var>m=c<sup>d</sup></var> mod <var>n</var>.\n\nThere exist values of <var>e</var>
16
- and <var>m</var> such that <var>m<sup>e</sup></var> mod <var>n=m</var>. \nWe call
17
- messages <var>m</var> for which <var>m<sup>e</sup></var> mod <var>n=m</var> unconcealed
18
- messages.\n\nAn issue when choosing <var>e</var> is that there should not be too
19
- many unconcealed messages. \nFor instance, let <var>p</var>=19 and <var>q</var>=37.
20
- \ \n\rThen <var>n</var>=19\\*37=703 and φ=18\\*36=648. \n\rIf we choose <var>e</var>=181,
21
- then, although gcd(181,648)=1 it turns out that all possible messages \n<var>m</var>
22
- (0 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)<var>m</var>
23
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)<var>n</var>-1)
24
- are unconcealed when calculating <var>m<sup>e</sup></var> mod <var>n</var>. \n\rFor
25
- any valid choice of <var>e</var> there exist some unconcealed messages. \n\rIt's
26
- important that the number of unconcealed messages is at a minimum.\n\nChoose <var>p</var>=1009
27
- and <var>q</var>=3643. \n\rFind the sum of all values of <var>e</var>, 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)<var>e</var>
28
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)φ(1009,3643)
29
- and gcd(<var>e</var>,φ)=1, so that the number of unconcealed messages for this value
30
- of <var>e</var> is at a minimum.\n\n"
7
+ \ \n\rFind an integer <var>e</var>, 1 ![<]({{ images_dir }}/symbol_lt.gif)<var>e</var>
8
+ ![<]({{ images_dir }}/symbol_lt.gif)φ, such that gcd(<var>e</var>,φ)=1.\n\nA message
9
+ in this system is a number in the interval [0,<var>n</var>-1]. \n\rA text to be
10
+ encrypted is then somehow converted to messages (numbers in the interval [0,<var>n</var>-1]).
11
+ \ \n\rTo encrypt the text, for each message, <var>m</var>, <var>c</var>=<var>m</var><sup><var>e</var></sup>
12
+ mod <var>n</var> is calculated.\n\nTo decrypt the text, the following procedure
13
+ is needed: calculate <var>d</var> such that <var>ed</var>=1 mod φ, then for each
14
+ encrypted message, <var>c</var>, calculate <var>m=c<sup>d</sup></var> mod <var>n</var>.\n\nThere
15
+ exist values of <var>e</var> and <var>m</var> such that <var>m<sup>e</sup></var>
16
+ mod <var>n=m</var>. \nWe call messages <var>m</var> for which <var>m<sup>e</sup></var>
17
+ mod <var>n=m</var> unconcealed messages.\n\nAn issue when choosing <var>e</var>
18
+ is that there should not be too many unconcealed messages. \nFor instance, let
19
+ <var>p</var>=19 and <var>q</var>=37. \n\rThen <var>n</var>=19\\*37=703 and φ=18\\*36=648.
20
+ \ \n\rIf we choose <var>e</var>=181, then, although gcd(181,648)=1 it turns out
21
+ that all possible messages \n<var>m</var> (0 ![≤]({{ images_dir }}/symbol_le.gif)<var>m</var>
22
+ ![≤]({{ images_dir }}/symbol_le.gif)<var>n</var>-1) are unconcealed when calculating
23
+ <var>m<sup>e</sup></var> mod <var>n</var>. \n\rFor any valid choice of <var>e</var>
24
+ there exist some unconcealed messages. \n\rIt's important that the number of unconcealed
25
+ messages is at a minimum.\n\nChoose <var>p</var>=1009 and <var>q</var>=3643. \n\rFind
26
+ the sum of all values of <var>e</var>, 1 ![<]({{ images_dir }}/symbol_lt.gif)<var>e</var>
27
+ ![<]({{ images_dir }}/symbol_lt.gif)φ(1009,3643) and gcd(<var>e</var>,φ)=1, so that
28
+ the number of unconcealed messages for this value of <var>e</var> is at a minimum.\n\n"
@@ -4,18 +4,17 @@
4
4
  :url: http://projecteuler.net/problem=183
5
5
  :content: "Let N be a positive integer and let N be split into <var>k</var> equal
6
6
  parts, <var>r</var> = N/<var>k</var>, so that N = <var>r</var> + <var>r</var> +
7
- ... + <var>r</var>. \n\rLet P be the product of these parts, P = <var>r</var> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
8
- <var>r</var> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
9
- ... ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) <var>r</var>
10
- = <var>r</var><sup><var>k</var></sup>.\n\nFor example, if 11 is split into five
11
- equal parts, 11 = 2.2 + 2.2 + 2.2 + 2.2 + 2.2, then P = 2.2<sup>5</sup> = 51.53632.\n\nLet
12
- M(N) = P<sub>max</sub> for a given value of N.\n\nIt turns out that the maximum
13
- for N = 11 is found by splitting eleven into four equal parts which leads to P<sub>max</sub>
14
- = (11/4)<sup>4</sup>; that is, M(11) = 14641/256 = 57.19140625, which is a terminating
15
- decimal.\n\nHowever, for N = 8 the maximum is achieved by splitting it into three
16
- equal parts, so M(8) = 512/27, which is a non-terminating decimal.\n\nLet D(N) =
17
- N if M(N) is a non-terminating decimal and D(N) = -N if M(N) is a terminating decimal.\n\nFor
18
- example, ΣD(N) for 5 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
19
- N ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 100 is
20
- 2438.\n\nFind ΣD(N) for 5 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
21
- N ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 10000.\n\n"
7
+ ... + <var>r</var>. \n\rLet P be the product of these parts, P = <var>r</var> ![×]({{
8
+ images_dir }}/symbol_times.gif) <var>r</var> ![×]({{ images_dir }}/symbol_times.gif)
9
+ ... ![×]({{ images_dir }}/symbol_times.gif) <var>r</var> = <var>r</var><sup><var>k</var></sup>.\n\nFor
10
+ example, if 11 is split into five equal parts, 11 = 2.2 + 2.2 + 2.2 + 2.2 + 2.2,
11
+ then P = 2.2<sup>5</sup> = 51.53632.\n\nLet M(N) = P<sub>max</sub> for a given value
12
+ of N.\n\nIt turns out that the maximum for N = 11 is found by splitting eleven into
13
+ four equal parts which leads to P<sub>max</sub> = (11/4)<sup>4</sup>; that is, M(11)
14
+ = 14641/256 = 57.19140625, which is a terminating decimal.\n\nHowever, for N = 8
15
+ the maximum is achieved by splitting it into three equal parts, so M(8) = 512/27,
16
+ which is a non-terminating decimal.\n\nLet D(N) = N if M(N) is a non-terminating
17
+ decimal and D(N) = -N if M(N) is a terminating decimal.\n\nFor example, ΣD(N) for
18
+ 5 ![≤]({{ images_dir }}/symbol_le.gif) N ![≤]({{ images_dir }}/symbol_le.gif) 100
19
+ is 2438.\n\nFind ΣD(N) for 5 ![≤]({{ images_dir }}/symbol_le.gif) N ![≤]({{ images_dir
20
+ }}/symbol_le.gif) 10000.\n\n"
@@ -3,11 +3,11 @@
3
3
  :name: Triangles containing the origin
4
4
  :url: http://projecteuler.net/problem=184
5
5
  :content: |+
6
- Consider the set <var>I<sub>r</sub></var> of points (<var>x</var>,<var>y</var>) with integer co-ordinates in the interior of the circle with radius <var>r</var>, centered at the origin, i.e. <var>x</var><sup>2</sup> + <var>y</var><sup>2</sup> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>r</var><sup>2</sup>.
6
+ Consider the set <var>I<sub>r</sub></var> of points (<var>x</var>,<var>y</var>) with integer co-ordinates in the interior of the circle with radius <var>r</var>, centered at the origin, i.e. <var>x</var><sup>2</sup> + <var>y</var><sup>2</sup> ![<]({{ images_dir }}/symbol_lt.gif) <var>r</var><sup>2</sup>.
7
7
 
8
8
  For a radius of 2, <var>I</var><sub>2</sub> contains the nine points (0,0), (1,0), (1,1), (0,1), (-1,1), (-1,0), (-1,-1), (0,-1) and (1,-1). There are eight triangles having all three vertices in <var>I</var><sub>2</sub> which contain the origin in the interior. Two of them are shown below, the others are obtained from these by rotation.
9
9
 
10
- ![](/home/will/src/euler-manager/config/../data/images/p_184.gif)
10
+ ![]({{ images_dir }}/p_184.gif)
11
11
 
12
12
  For a radius of 3, there are 360 triangles containing the origin in the interior and having all vertices in <var>I</var><sub>3</sub> and for <var>I</var><sub>5</sub> the number is 10600.
13
13