OFFSET
1,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 10 2002
EXTENSIONS
Keyword cons removed by R. J. Mathar, Jul 23 2009
STATUS
approved