A007509 Numerator of Sum_{k=0..n} (-1)^k/(2*k+1).
1, 2, 13, 76, 263, 2578, 36979, 33976, 622637, 11064338, 11757173, 255865444, 1346255081, 3852854518, 116752370597, 3473755390832, 3610501179557, 3481569435902, 133330680156299, 129049485078524, 5457995496252709, 227848175409504262, 234389556075339277
Offset: 0
Examples
1/1, 2/3, 13/15, 76/105, 263/315, 2578/3465, 36979/45045, 33976/45045, 622637/765765, ...
References
- P. Beckmann, A History of Pi. Golem Press, Boulder, CO, 2nd ed., 1971, p. 131.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Eric Weisstein's World of Mathematics, Pi.
- Eric Weisstein's World of Mathematics, Pi - Continued Fraction.
- R. G. Wilson, V, Notes with attachment.
Crossrefs
Programs
-
Magma
[Numerator(&+[(-1)^k/(2*k+1):k in [0..n]]): n in [0..23]]; // Marius A. Burtea, Aug 26 2019
-
Maple
A007509 := n->numer(add((-1)^k/(2*k+1),k=0..n));
-
Mathematica
Table[Numerator[FunctionExpand[(Pi + (-1)^n(HarmonicNumber[n/2 + 1/4] - HarmonicNumber[n/2 - 1/4]))/4]], {n, 0, 20}] (* Vladimir Reshetnikov, Jan 18 2011 *) Numerator[Table[Sum[(-1)^k/(2k+1),{k,0,n}],{n,0,30}]] (* Harvey P. Dale, Oct 22 2011 *) Table[(-1)^k/(2k+1),{k,0,30}]//Accumulate//Numerator (* Harvey P. Dale, May 03 2019 *)
Formula
a(n) = numerator((Psi(n + 3/2) - Psi((2*n - (-1)^n)/4 + 1) - log(2) + Pi/2)/2), with the digamma function Psi(z). See the formula in A352395. - Wolfdieter Lang, Apr 06 2022
a(n) = numerator(Pi/4 + (-1)^n * (Psi((n + 5/2)/2) - Psi((n + 3/2)/2))/4). - Vaclav Kotesovec, May 16 2022
Comments