login
Factorial expansion of sqrt(3) = Sum_{n>=1} a(n)/n!.
3

%I #22 May 22 2022 09:49:01

%S 1,1,1,1,2,5,0,4,2,5,10,8,1,5,6,8,5,13,18,0,7,20,9,6,14,2,7,7,18,11,0,

%T 12,20,10,31,28,27,34,29,18,13,8,28,14,9,12,39,5,15,8,5,0,7,21,54,13,

%U 16,20,24,18,12,14,6,53,21,42,47,14,46,14,42,71,41,63,24,28,32,61,35

%N Factorial expansion of sqrt(3) = Sum_{n>=1} a(n)/n!.

%H G. C. Greubel, <a href="/A067881/b067881.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="https://oeis.org/index/Fa#facbase">Index entries for factorial base representation</a>

%F a(1) = 1; for n > 1, a(n) = floor(n!*sqrt(3)) - n*floor((n-1)!*sqrt(3)).

%e sqrt(3) = 1 + 1/2! + 1/3! + 1/4! + 2/5! + 5/6! + 0/7! + 4/8! + 2/9! + ...

%p 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

%t 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 *)

%o (PARI) default(realprecision, 250); {b = sqrt(3); a(n) = if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b))};

%o for(n=1, 80, print1(a(n), ", ")) \\ _G. C. Greubel_, Dec 10 2018

%o (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

%o (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

%o (Sage) b=sqrt(3);

%o def a(n):

%o if (n==1): return floor(b)

%o else: return expand(floor(factorial(n)*b) - n*floor(factorial(n-1)*b))

%o [a(n) for n in (1..80)] # _G. C. Greubel_, Dec 10 2018

%Y Cf. A002194 (decimal expansion), A040001 (continued fraction).

%Y Cf. A009949 (sqrt(2)), A068446 (sqrt(5)), A320839 (sqrt(7)).

%K easy,nonn

%O 1,5

%A _Benoit Cloitre_, Mar 10 2002