OFFSET
1,3
COMMENTS
This expansion can also be considered as the expansion of -1/(golden ratio).
LINKS
EXAMPLE
(1-sqrt(5))/2 = -1 + 2/3! + 1/4! + 5/6! + 7/9! + 8/10! + 2/11! + ...
MATHEMATICA
With[{b = -1/GoldenRatio}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]]
PROG
(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)), ", "))
(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]];
(Sage)
def a(n):
if (n==1): return floor(-1/golden_ratio)
else: return expand(floor(factorial(n)*(-1/golden_ratio)) - n*floor(factorial(n-1)*(-1/golden_ratio)))
[a(n) for n in (1..80)]
CROSSREFS
KEYWORD
sign
AUTHOR
G. C. Greubel, Nov 26 2018
STATUS
approved