OFFSET
1,5
LINKS
FORMULA
a(1) = 1; for n > 1, a(n) = floor(n!*sqrt(3)) - n*floor((n-1)!*sqrt(3)).
EXAMPLE
sqrt(3) = 1 + 1/2! + 1/3! + 1/4! + 2/5! + 5/6! + 0/7! + 4/8! + 2/9! + ...
MAPLE
Digits:=200: a:=n->`if`(n=1, floor(sqrt(3)), floor(factorial(n)*sqrt(3))-n*floor(factorial(n-1)*sqrt(3))): seq(a(n), n=1..90); # Muniru A Asiru, Dec 11 2018
MATHEMATICA
With[{b = Sqrt[3]}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]] (* G. C. Greubel, Dec 10 2018 *)
PROG
(PARI) default(realprecision, 250); {b = sqrt(3); a(n) = if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b))};
for(n=1, 80, print1(a(n), ", ")) \\ G. C. Greubel, Dec 10 2018
(PARI) apply( A067881(n)=if(n>1, sqrt(precision(3., n*log(n/2.5)\2.3+2))*(n-1)!%1*n\1, 1), [1..79]) \\ M. F. Hasler, Dec 14 2018
(Magma) SetDefaultRealField(RealField(250)); [Floor(Sqrt(3))] cat [Floor(Factorial(n)*Sqrt(3)) - n*Floor(Factorial((n-1))*Sqrt(3)) : n in [2..80]]; // G. C. Greubel, Dec 10 2018
(Sage) b=sqrt(3);
def a(n):
if (n==1): return floor(b)
else: return expand(floor(factorial(n)*b) - n*floor(factorial(n-1)*b))
[a(n) for n in (1..80)] # G. C. Greubel, Dec 10 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Mar 10 2002
STATUS
approved