mathematical_formulas.sf 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. #!/usr/bin/ruby
  2. # Daniel "Trizen" Șuteu
  3. # Date: 10 July 2017
  4. # https://github.com/trizen
  5. # A collection of formulas for common mathematical constants.
  6. const n = (ARGV ? Num(ARGV[0]) : 30) # number of iterations
  7. define ℯ = Num.e
  8. define π = Num.pi
  9. define γ = Num.EulerGamma
  10. define C = Num.C
  11. func display(r, t) {
  12. say "#{r}\terror: #{ '%.0g' % abs(r - t) }"
  13. }
  14. #
  15. ## zeta(3)
  16. #
  17. say "=> zeta(3)"
  18. # Accelerating series for zeta(3), due to Apery.
  19. display(5/2 * sum(1..n, {|n|
  20. (-1)**(n-1) / n**3 / binomial(2*n, n)
  21. }), zeta(3))
  22. # Accelerating series for zeta(3), due to Gosper (1976)
  23. display(sum(1..n, {|n|
  24. (30*n - 11) / 16 / (2*n - 1) / n**3 / binomial(2*n - 1, n)**2
  25. }), zeta(3))
  26. # Accelerating series for zeta(3), due to Gosper (1976).
  27. display(π * sum(1..n, {|n|
  28. (30*n - 11) * Γ(n)**2 / n / (2*n - 1)**3 / Γ(n - 1/2)**2 / 16**n
  29. }), zeta(3))
  30. # A formula due to Ewell for zeta(3)
  31. display(-(π**2 / 3) * sum(0..^n, {|n|
  32. (2*n + 5) * zeta(2*n) / (2*n + 1) / (2*n + 2) / (2*n + 3) / 2**(2*n)
  33. }), zeta(3))
  34. # A formula related to one found by Ewell for zeta(3)
  35. display(sum(0..^n, {|n|
  36. zeta(2*n) / (2*n + 1) / (2*n + 2) / 2**(2*n)
  37. }) * -(4 * π**2)/7, zeta(3))
  38. # A formula related to one found by Ewell for zeta(3), with convergence improved by the author.
  39. display((log(27/16) + sum(0..^n, {|n|
  40. (zeta(2*n) - 1) / (2*n + 1) / (2*n + 2) / 2**(2*n)
  41. })) * -(4 * π**2)/7, zeta(3))
  42. # Formula due to Cezar Lupu and Derek Orr for zeta(3) (with good convergence)
  43. display((4 * π**2 / 35) * (3/2 - log(π/2) + sum(1..n, {|n|
  44. zeta(2*n) / n / (n + 1) / (2*n + 1) / 16**n
  45. })), zeta(3))
  46. # Formula due to Cezar Lupu and Derek Orr for zeta(3) (with very good convergence)
  47. display((2 * π**2 / 35) * (9 + 138*log(2) - 18*log(3) - 50*log(5) - 2*log(π) + 2*sum(1..n, {|n|
  48. (zeta(2*n) - 1) / n / (2*n + 1) / (n + 1) / 16**n
  49. })), zeta(3))
  50. # Formula involving the Catalan constant
  51. display((4 * π**2 / 35) * (1/2 + (2*C / π) - sum(1..n, {|n|
  52. zeta(2*n) / (n + 1) / (2*n + 1) / 16**n
  53. })), zeta(3))
  54. # Formula due to Strivastava, Glasser and Adamchik
  55. display((2 * π**2 / 9) * (log(2) + 2*sum(0..^n, {|n|
  56. zeta(2*n) / (2*n + 3) / 4**n
  57. })), zeta(3))
  58. # Formula due to Euler
  59. display(prod(1..n, {|n|
  60. 1/(1 - prime(n)**(-3))
  61. }), zeta(3))
  62. # Formula due to Doron Zeilberger
  63. display(1/2 * sum(1..n, {|n|
  64. (-1)**(n-1) * (205 * n**2 - 160*n + 32) / n**5 / binomial(2*n, n)**5
  65. }), zeta(3))
  66. #
  67. ## Pi
  68. #
  69. say "\n=> Pi"
  70. # Famous series of Srinivasa Ramanujan for 1/Pi
  71. display(1/(2 * sqrt(2) / 9801 * sum(0..^n, {|n|
  72. (4*n)! * (1103 + 26390*n) / (n!)**4 / 396**(4*n)
  73. })), π)
  74. # Formula due to Srinivasa Ramanujan for 1/Pi
  75. display(1/sum(0..^n, {|n|
  76. binomial(2*n, n)**3 * (42*n + 5) / 2**(12*n + 4)
  77. }), π)
  78. # The Ramanujan series for 1/π, improved by David and Gregory Chudnovsky
  79. display(1/(12/(640320**(3/2)) * sum(0..^n, {|n|
  80. (-1)**n * (6*n)! * (13591409 + n*545140134) / ((3*n)!) / (n!)**3 / 640320**(3*n)
  81. })), π)
  82. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n)
  83. display(exp(1 + sum(1..n, {|n|
  84. zeta(2*n) / n / (2*n + 1) / 4**n
  85. })), π)
  86. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n)
  87. display(sqrt(8 * (1/2 + sum(1..n, {|n|
  88. zeta(2*n) * (2*n - 1) / 4**n
  89. }))), π)
  90. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n)
  91. display(sqrt(16 * sum(1..n, {|n|
  92. zeta(2*n) * n / 4**n
  93. })), π)
  94. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n)
  95. display(sqrt(32/3 * sum(1..n, {|n|
  96. zeta(2*n) * n**2 / 4**n
  97. })), π)
  98. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n)
  99. display(2*sqrt(2)*exp(sum(1..n, {|n|
  100. zeta(2*n) / n / 16**n
  101. })), π)
  102. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n)
  103. display(sqrt(16 * (1/2 + sum(1..n, {|n|
  104. zeta(2*n) * (2*n - 1) / 16**n
  105. }))), π)
  106. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n) (corrected by the author)
  107. display(cbrt(32 * (1 - sum(1..n, {|n|
  108. zeta(2*n) * (2*n - 1) * (2*n - 2) / 16**n
  109. }))), π)
  110. # Formula due to Cezar Lupu and Derek Orr, involving zeta(2n)
  111. display(4 - (8 * sum(1..n, {|n|
  112. zeta(2*n) / 16**n
  113. })), π)
  114. # Formula for Pi^2, independently discovered by Oyama Shokei and Yamaji Nushizumi (~1765).
  115. display(sqrt(8*(1 + sum(1..n, {|n|
  116. 2**(n+1) * (n!)**2 / (2*n + 2)!
  117. }))), π)
  118. # Formula due to Ajima Naonobu (1795) (rediscovered by the author).
  119. display(2 * sum(0..^n, {|n|
  120. (n!) / (2*n + 1)!!
  121. }), π)
  122. # Formula due to Euler (?)
  123. display(sqrt(8 * sum(0..^n, {|n|
  124. 1 / (2*n + 1)**2
  125. })), π)
  126. # Wallis' product (1)
  127. display(2 * prod(1..n, {|n|
  128. (4 * n**2) / (4 * n**2 - 1)
  129. }), π)
  130. # Wallis'product (2)
  131. display(4*prod(1..n, {|n|
  132. ((2*n + 1)**2 - 1) / (2*n + 1)**2
  133. }), π)
  134. # Wallis'product (3)
  135. display((2*prod(1..n, {|n|
  136. (4 * n**2) / (4 * n**2 - 1)
  137. }) + 4*prod(1..n, {|n|
  138. ((2*n + 1)**2 - 1) / (2*n + 1)**2
  139. })) / 2, π)
  140. # Formula (re?)discovered by the author.
  141. display(prod(1..n, {|n|
  142. (4 * n**3) / ((4 * n**3) - 3*n + 1)
  143. }), π)
  144. # Formula (re?)discovered by the author.
  145. display(3/2 * sqrt(3) * sum(0..^n, {|n|
  146. (n!)**2 / (2*n + 1)!
  147. }), π)
  148. # Formula (re?)discovered by the author.
  149. display(sqrt(6 * (2 - sum(1..n, {|n|
  150. 1/(n * (n+1)**2)
  151. }))), π)
  152. # Formula (re?)discovered by the author.
  153. display(6 * (-log(2) + sum(0..^n, {|n|
  154. 1/(n + (2*n + 1)**2)
  155. })), π)
  156. # Spigot algorithm for Pi
  157. display(sum(0..^n, {|n|
  158. (-1/4)**n * (1/(2*n + 1) + 2/(4*n + 1) + 1/(4*n + 3))
  159. }), π)
  160. # beta(3)
  161. display(cbrt(32 * sum(0..^n, {|n|
  162. (-1)**n / (2*n + 1)**3
  163. })), π)
  164. # Based on Stirling's asymptotic formula for n!
  165. display((n!)**2 * exp(2*n) / n**(2*n + 1) / 2, π)
  166. # Based on Stirling's asymptotic formula for n!, with (1 + 1/n)^n for e
  167. display((ℯ * ((-n - 1)**(-n) * (-n)**n * n)**(-2*n) * (n!)**2)/(2*n), π)
  168. # Based on Stirling's asymptotic formula for n!, with ((n+1)/(n-1))^(n/2) for e
  169. display(((n * ((n + 1)/(n - 1))**(-n/2))**(-2*n) * (n!)**2)/(2*n), π)
  170. # Limit derived by the author from gamma(1/2).
  171. display(4 * 16**n * n * (n!)**4 / ((2*n + 1)!)**2, π)
  172. # Limit derived by the author from gamma(1/2).
  173. display(4 * 2**(4*n - 1) * (n!)**4 / (2*n + 1) / ((2*n)!)**2, π)
  174. # Limit derived by the author from gamma(1/2).
  175. display(2 * 4**n * (n!)**2 / ((2*n - 1)!!) / ((2*n + 1)!!), π)
  176. # Limit derived by the author from gamma(1/2).
  177. display(4 * 16**n * (n!)**3 * ((n+1)!) / ((2*n + 1)!)**2, π)
  178. # Limit derived by the author from gamma(1/2).
  179. display(16**n * (n!)**3 * ((n-1)!) / ((2*n)!)**2, π)
  180. # Limit derived by the author from gamma(1/2).
  181. display(sqrt(16 * 256**n * n * ((n+1)!) * (n!)**7 / ((2*n + 1)!)**4), π)
  182. # Limit derived by the author from gamma(1/2).
  183. display(sqrt(128 * 256**n * (n + 1)**4 * ((2 * n**2) + 2*n + 1) * (n!)**8 / ((2*n + 2)!)**4), π)
  184. # Formula due to S. M. Abrarov and B. M. Quine.
  185. # Described in their paper: "A reformulated series expansion of the arctangent function"
  186. display(-8 * sum(1..n, {|n|
  187. sum(1..(2*n - 1), {|k|
  188. (-1)**k / (2*n - 1) / (1 + (1**2 / 4))**(2*n - 1) * (1/2)**(4*n - 2*k - 1) * binomial(2*n - 1, 2*k - 1)
  189. })
  190. }), π)
  191. # Formula (re?)discovered by the author.
  192. display(sqrt(12 * (sum(1..n, {|n|
  193. 1 / n**2 / 2**n
  194. }) + (log(2)**2 / 2))), π)
  195. # Formula (re?)discovered by the author (equivalent with the above formula).
  196. display(sqrt(6 * (sum(1..n, {|n|
  197. 1 / n**2 / 2**(n-1)
  198. }) + log(2)**2)), π)
  199. # The gamma function at 1/2, which is sqrt(π).
  200. display((exp(γ/2)/2 * prod(1..n, {|n|
  201. (1 + 1/(2*n)) * exp(-1/(2*n))
  202. }))**(-2), π)
  203. # Formula due to Abraham Sharp (1699)
  204. display(sum(0..^n, {|n|
  205. (-1)**n / 3**n / (2*n + 1)
  206. }) / sqrt(3) * 6, π)
  207. # Formula due to John Machin (1706)
  208. display(4*(4*sum(0..^n, {|n|
  209. (-1)**n / (2*n + 1) / 5**(2*n + 1)
  210. }) - sum(0..^n, {|n|
  211. (-1)**n / (2*n + 1) / 239**(2*n + 1)
  212. })), π)
  213. # Formula due to Matsunaga Yoshisuke (1739)
  214. display(sqrt(18*sum(0..^n, {|n|
  215. n!**2 / (2*n + 2)!
  216. })), π)
  217. # Formula due to Euler
  218. display(sqrt(18*sum(1..n, {|n|
  219. n**(-2) / binomial(2*n, n)
  220. })), π)
  221. # Formula due to Newton, based on arcsin(1/2) = π/6
  222. display(6 * (1/2 + sum(1..n, {|n|
  223. ((2*n - 1)!!) / (2*n + 1) / ((2*n)!!) / 2**(2*n + 1)
  224. })), π)
  225. # Formula due to N. J. Wildberger (2012)
  226. display(do {
  227. sqrt(2 - func (n) {
  228. n > 0 ? sqrt(2 + __FUNC__(n-1)) : 0
  229. }(n)) * 2**(n+1)
  230. }, π)
  231. # Formula due to Karl Heinrich Schellbach (1832)
  232. display(4 * sum(0..^n, {|n|
  233. (-1)**n * (1/(2**(2*n + 1)) + 1/(3**(2*n + 1))) / (2*n + 1)
  234. }), π)
  235. # Formula due to Louis Comtet (1974)
  236. display((3240/17 * sum(1..n, {|n|
  237. 1 / n**4 / binomial(2*n, n)
  238. }))**(1/4), π)
  239. # Formula due to Jonathan Borwein and Peter Borwein (1988)
  240. display(1/(12*sum(0..^n, {|n|
  241. (-1)**n * (6*n)! * ((212175710912*sqrt(61) + 1657145277365) + (13773980892672*sqrt(61) + 107578229802750)*n) / n!**3 / ((3*n)!) / (5280 * (236674 + 30303*sqrt(61)))**(3*n + 3/2)
  242. })), π)
  243. # Formula due to David Bailey, Peter Borwein and Simon Plouffe (1995)
  244. display(sum(0..^n, {|n|
  245. (4/(8*n + 1) - 2/(8*n + 4) - 1/(8*n + 5) - 1/(8*n + 6)) / 16**n
  246. }), π)
  247. # Formula due to Fabrice Bellard (1997)
  248. display(sum(0..^n, {|n|
  249. (-1)**n / 2**(10*n) * (-32/(4*n + 1) - 1/(4*n + 3) + 256/(10*n + 1) - 64/(10*n + 3) - 4/(10*n + 5) - 4/(10*n + 7) + 1/(10*n + 9))
  250. }) / 64, π)
  251. # Formula due to Fabrice Bellard (1997)
  252. display((sum(1..n, {|n|
  253. 3 * (-(885673181 * n**5) + (3125347237 * n**4) - (2942969225 * n**3) + (1031962795 * n**2) - (196882274 * n) + 10996648) / binomial(7*n, 2*n) / 2**(n-1)
  254. }) - 20379280)/ 740025, π)
  255. # Formula due to Cetin Hakimoglu-Brown (2009)
  256. display(sqrt(3) / 7776 * sum(0..^n, {|n|
  257. ((4*n)!)**2 * ((6*n)!) / 9**(n+1) / ((12*n)!) / ((2*n)!) * (127169/(12*n + 1) - 1070/(12*n + 5) - 131/(12*n + 7) + 2/(2*n + 11))
  258. }), π)
  259. # Formula due to Cetin Hakimoglu-Brown (2009)
  260. display(sum(0..^n, {|n|
  261. 1 / binomial(8*n, 4*n) / 9**n * (5717/(8*n + 1) - 413/(8*n + 3) - 45/(8*n + 5) + 5/(8*n + 7))
  262. }) / 1024 / sqrt(3), π)
  263. # Formula (re?)discovered by the author.
  264. display((16*sum(0..^n, {|n|
  265. (-1)**n / (2*n + 2) / (3*n - 1) / (3*n + 1)
  266. }) + 3) / -sqrt(3), π)
  267. #
  268. ## exp(1)
  269. #
  270. say "\n=> exp(1)"
  271. # Formula (re?)discovered by the author.
  272. display(sqr(sum(0..^n, {|n|
  273. ((2*n + 1)!!) / (2*n + 1)!
  274. })), ℯ)
  275. # Basic formula for `e`, due to Euler
  276. display(sum(0..^n, {|n|
  277. 1/n!
  278. }), ℯ)
  279. # Definition of e
  280. display((1 + 1/n)**n, ℯ)
  281. # Binomial expansion (1 + 1/n)^n
  282. display(sum(0..n, {|k|
  283. n! * n**(k-n) / (k!) / (n-k)!
  284. }), ℯ)
  285. # Limit_{n->Infinity} (n-1)^(-n) * (n+1)^n = exp(2)
  286. display(sqrt((n - 1)**(-n) * (n+1)**n), ℯ)
  287. #
  288. ## Euler-Mascheroni constant
  289. #
  290. say "\n=> Euler-Mascheroni"
  291. # Euler-Mascheroni constant, involving zeta(n)
  292. display(1 - sum(2..(n+1), {|n|
  293. (zeta(n) - 1) / n
  294. }), γ)
  295. # Limit_{n->Infinity} zeta((n+1)/n) - n} = gamma
  296. display(zeta((n+1)/n) - n, γ)
  297. # Series due to Euler (1731).
  298. display(sum(2..(n+1), {|n|
  299. (-1)**n * zeta(n) / n
  300. }), γ)
  301. # Original definition of the Euler-Mascheroni constant, due to Euler (1731)
  302. display(sum(1..n, {|n|
  303. 1/n
  304. }) - log(n), γ)
  305. # Original definition of the Euler-Mascheroni constant,
  306. # with an additional correction term (re)discovered by the author.
  307. display(sum(1..n, {|n|
  308. 1/n
  309. }) - log(n) - 3/(6*n + 1), γ)
  310. # Original definition of the Euler-Mascheroni constant, with additional correction terms.
  311. display(sum(1..n, {|n|
  312. 1/n
  313. }) - log(n) - 1/(2*n) + 1/(12 * n**2) - 1/(120 * n**4) + 1/(252 * n**6) - 1/(240 * n**8) + 1/(132 * n**10) - 1/(47 * n**12), γ)
  314. # Formula due to Euler
  315. display(harmfrac(n) - log(n) - 1/(2*n) - sum(1..n, {|k|
  316. -bernfrac(2*k) / (2*k) / n**(2*k)
  317. }), γ)
  318. # Formula derived by the author from the above formula of Euler
  319. display(harmfrac(n) - log(n) - 1/(2*n) - sum(1..n, {|k|
  320. (-1)**k * 4 * sqrt(π*k) * (π * ℯ)**(-2*k) * k**(2*k) / (2*k) / n**(2*k)
  321. }), γ)
  322. # Formula derived by the author from the above formula of Euler
  323. display(harmfrac(n) - log(n) - 1/(2*n) - sum(1..n, {|k|
  324. (-1)**k * 2 / (2*π)**(2*k) * ((2*k)!) / (2*k) / n**(2*k)
  325. }), γ)
  326. # Formula due to Euler in terms of log(2) and the odd zeta values
  327. display(3/4 - log(2)/2 + sum(1..n, {|n|
  328. (1 - 1/(2*n + 1)) * (zeta(2*n + 1) - 1)
  329. }), γ)
  330. # Formula due to Euler in terms of log(2) and the odd zeta values (VII)
  331. display(log(2) - sum(1..n, {|n|
  332. zeta(2*n + 1) / (2*n + 1) / 2**(2*n)
  333. }), γ)
  334. # Formula due to Vacca (1910)
  335. display(sum(1..n, {|n|
  336. (-1)**n * floor(log2(n)) / n
  337. }), γ)
  338. #
  339. ## Catalan constant
  340. #
  341. say "\n=> Catalan constant"
  342. display(π/2 * (sum(1..n, {|n|
  343. zeta(2*n) / n / (2*n + 1) / 16**n
  344. }) - log(π/2) + 1), C)
  345. # Formula from the paper "Fast multiprecision evaluation of series of rational numbers"
  346. display(3/8 * (sum(0..^n, {|n|
  347. 1 / binomial(2*n, n) / (2*n + 1)**2
  348. })) + (π/8 * log(2 + sqrt(3))), C)
  349. #
  350. ## log(2)
  351. #
  352. say "\n=> log(2)"
  353. # The log(2) constant involving zeta(2n)
  354. display(sum(1..n, {|n|
  355. (zeta(2*n) - 1) / n
  356. }), log(2))
  357. # A geometric series for log(2)
  358. display(sum(1..n, {|n|
  359. 1 / n / 2**n
  360. }), log(2))
  361. # Formula reformulated by the author based on the above formula.
  362. display(sum(0..^n, {|n|
  363. (n!) / (2*n + 2)!!
  364. }), log(2))
  365. # Formula reformulated by the author (equivalent with the above one)
  366. display(sum(0..^n, {|n|
  367. 1 / (2*n + 2) / 2**n
  368. }), log(2))
  369. # Formula (re?)discovered by the author.
  370. display(sum(0..^n, {|n|
  371. 1 / ((2*n + 1) * (2*n + 2))
  372. }), log(2))
  373. # Formula based on: log(x) = 2*Sum_{n>=0} ((x-1)/(x+1))^(2n+1)/(2n+1)
  374. display(2 * sum(0..^n, {|n|
  375. (1 / 3)**(2*n + 1) / (2*n + 1)
  376. }), log(2))
  377. # Formula used by the MPFR library
  378. display(3/4 * sum(0..^n, {|n|
  379. (-1)**n * n!**2 / 2**n / (2*n + 1)!
  380. }), log(2))
  381. # Formula from Wikipedia
  382. display((sum(0..^n, {|n|
  383. (-1)**n / (n+1) / (n+2)
  384. }) + 1)/2, log(2))
  385. # Formula from Wikipedia
  386. display(sum(1..n, {|n|
  387. 1 / n / (8 * n**2 - 2)
  388. }) + 1/2, log(2))
  389. # Formula from Wikipedia
  390. display(sum(1..n, {|n|
  391. (-1)**n / n / (4 * n**2 - 1)
  392. }) + 1, log(2))
  393. # Formula from Wikipedia
  394. display(sum(1..n, {|n|
  395. (-1)**n / (2*n) / (3*n - 1) / (3*n + 1)
  396. }) + 3/4, log(2))
  397. # Formula from Wikipedia
  398. display(sum(2..(n+1), {|n|
  399. (zeta(n) - 1) / 2**n
  400. }) + 1/2, log(2))
  401. # Formula from Wikipedia
  402. display(1 - sum(1..n, {|n|
  403. zeta(2*n) / 2**(2*n - 1) / (2*n + 1)
  404. }), log(2))
  405. # Formula from Wikipedia
  406. display(sum(1..n, {|n|
  407. (3**(-n) + 4**(-n)) / n
  408. }), log(2))
  409. # Formula from Wikipedia
  410. display(sum(1..n, {|n|
  411. (1/(2*n) + 1/(4*n + 1) + 1/(8*n + 4) + 1/(16*n + 12)) / 16**n
  412. }) / 2 + 2/3, log(2))
  413. # Formula from Wikipedia
  414. display(sum(0..^n, {|n|
  415. 14/(31**(2*n + 1) * (2*n + 1)) + 6/(161**(2*n + 1) * (2*n + 1)) + 10/(49**(2*n + 1) * (2*n + 1))
  416. }), log(2))