%I #31 Sep 08 2022 08:45:05
%S 1,1,0,2,4,0,6,7,1,1,8,1,6,0,11,0,10,5,6,9,15,20,10,15,1,18,5,13,9,0,
%T 13,15,2,27,28,2,32,36,11,4,34,37,0,4,32,10,4,4,32,46,39,37,2,20,27,8,
%U 54,27,45,9,26,18,59,0,22,63,41,54,65,61,45,51,61,31,68,48,34,39,71,59
%N Factorial expansion of the golden ratio (1+sqrt(5))/2 = Sum_{n>=1} a(n)/n!.
%H G. C. Greubel, <a href="/A068451/b068451.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Fa#facbase">Index to sequences related to factorial base representation of noninteger constants</a>.
%t With[{b = GoldenRatio}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]] (* _G. C. Greubel_, Mar 21 2018 *)
%o (PARI) default(realprecision, 250); b = (1+sqrt(5))/2; for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", ")) \\ _G. C. Greubel_, Mar 21 2018
%o (PARI) A068451(N=90,c=precision(sqrt(5)+1,logint(N!,10))/2)=vector(N,n,if(n>1,c=c%1*n,c)\1) \\ _M. F. Hasler_, Nov 27 2018
%o (Magma) SetDefaultRealField(RealField(250)); [Floor((1+Sqrt(5))/2)] cat [Floor(Factorial(n)*(1+Sqrt(5))/2) - n*Floor(Factorial((n-1))*(1+Sqrt(5))/2) : n in [2..80]]; // _G. C. Greubel_, Mar 21 2018
%o (Sage)
%o def A068451(n):
%o if (n==1): return floor(golden_ratio)
%o else: return expand(floor(factorial(n)*golden_ratio) - n*floor(factorial(n-1)*golden_ratio))
%o [A068451(n) for n in (1..80)] # _G. C. Greubel_, Nov 26 2018
%Y Cf. A001622 (decimal expansion).
%Y Cf. A075874 and A007514.
%K easy,nonn
%O 1,4
%A _Benoit Cloitre_, Mar 10 2002