OFFSET
0,1
LINKS
Eric Weisstein's World of Mathematics, Phi Number System
Index entries for linear recurrences with constant coefficients, signature (-1,2,3,1).
FORMULA
a(n) = phi^n - (-1)^n * (n - phi^-n), phi = (1 + sqrt(5))/2 = A001622.
G.f.: (2*x+1)*(x^2-2)/((x^2+x-1)*(x+1)^2). - Alois P. Heinz, Oct 17 2014
a(n) = A000032(n) - (-1)^n*n. - Alois P. Heinz, Oct 17 2014
EXAMPLE
a(7) = phi^7 + (n - phi^-7) = 36; a(10) = phi^10 - (n - phi^-10) = 113.
MATHEMATICA
LinearRecurrence[{-1, 2, 3, 1}, {2, 2, 1, 7}, 40] (* Harvey P. Dale, Sep 21 2023 *)
PROG
(PARI) a(n)=fibonacci(n-1) + fibonacci(n+1) - n*(-1)^n \\ Charles R Greathouse IV, Oct 28 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gustavo Mendoza, Oct 16 2014
STATUS
approved