login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A068450
Factorial expansion of sqrt(Pi) = Sum_{n>0} a(n)/n!.
3
1, 1, 1, 2, 2, 4, 1, 1, 3, 0, 5, 10, 6, 8, 12, 0, 10, 0, 12, 9, 6, 12, 22, 21, 24, 3, 14, 21, 13, 24, 21, 11, 8, 22, 27, 3, 8, 1, 36, 21, 27, 15, 2, 41, 22, 34, 8, 0, 4, 8, 39, 48, 27, 38, 22, 0, 23, 49, 19, 27, 29, 28, 40, 33, 21, 62, 7, 67, 33, 8, 30, 18, 60, 73, 61, 72, 42, 59, 22
OFFSET
1,4
LINKS
EXAMPLE
sqrt(Pi) = 1 + 1/2! + 1/3! + 2/4! + 2/5! + 4/6! + 1/7! + ...
MATHEMATICA
Table[If[n == 1, Floor[Sqrt[Pi]], Floor[n!*Sqrt[Pi]] - n*Floor[(n - 1)!*Sqrt[Pi]]], {n, 1, 50}] (* G. C. Greubel, Mar 21 2018 *)
PROG
(PARI) default(realprecision, 250); for(n=1, 30, print1(if(n==1, floor(sqrt(Pi)), floor(n!*sqrt(Pi)) - n*floor((n-1)!*sqrt(Pi))), ", ")) \\ G. C. Greubel, Mar 21 2018
(PARI) vector(30, n, if(n>1, t=t%1*n, t=sqrt(Pi))\1) \\ M. F. Hasler, Nov 25 2018
(Magma) SetDefaultRealField(RealField(250)); R:= RealField(); [Floor(Sqrt(Pi(R)))] cat [Floor(Factorial(n)*Sqrt(Pi(R))) - n*Floor(Factorial((n-1))*Sqrt(Pi(R))) : n in [2..30]]; // G. C. Greubel, Mar 21 2018
(Sage)
def A068450(n):
if (n==1): return floor(sqrt(pi))
else: return expand(floor(factorial(n)*sqrt(pi)) - n*floor(factorial(n-1)*sqrt(pi)))
[A068450(n) for n in (1..80)] # G. C. Greubel, Nov 27 2018
CROSSREFS
Cf. A075874, A002161 (decimal expansion).
Sequence in context: A004565 A068449 A362258 * A071436 A214741 A243487
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 10 2002
EXTENSIONS
Keyword cons removed by R. J. Mathar, Jul 23 2009
STATUS
approved