OFFSET
0,7
COMMENTS
The array of successive differences begins:
1, 1, 1, -1, 1, 1, 5, 5, 9, 11, 21, 33, 57, ...
0, 0, -2, 2, 0, 4, 0, 4, 2, 10, 12, 24, 32, ...
0, -2, 4, -2, 4, -4, 4, -2, 8, 2, 12, 8, 24, ...
-2, 6, -6, 6, -8, 8, -6, 10, -6, 10, -4, 16, 6, ...
8, -12, 12, -14, 16, -14, 16, -16, 16, -14, 20, -10, 24, ...
...
Main diagonal is A099430(n).
The first upper subdiagonal, 1, -2, -2, -8, -14, ..., has -3*A078008(n) as first differences.
The second upper subdiagonal is A000079(n) = 2^n.
a(n) is related to Fibonacci numbers a(n) = A000045(n-2) + period 6: repeat [2, 0, 1, -2, 0, -1].
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,1).
FORMULA
G.f.: (1-x^2-2*x^3+x^4)/((1+x)*(1-x+x^2)*(1-x-x^2)).
a(n) ~ phi^(n-2)/sqrt(5), where phi is the golden ratio.
a(n) = (1/2 + sqrt(5)/2)^n*(3*sqrt(5)/10-1/2) - (-1/2 + sqrt(5)/2)^n*(3*sqrt(5)/10 + 1/2)*(-1)^n + 2*sqrt(3)*sin(Pi*(n/3 + 1/3))/3 + (-1)^n. - Eric Simon Jacob, Jul 11 2024
MATHEMATICA
LinearRecurrence[{1, 1, -1, 1, 1}, {1, 1, 1, -1, 1}, 40]
PROG
(PARI) my(x='x+O('x^40)); Vec((1-x^2-2*x^3+x^4)/((1+x^3)*(1-x-x^2))) \\ G. C. Greubel, Jun 11 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x^2-2*x^3+x^4)/((1+x^3)*(1-x-x^2)) )); // G. C. Greubel, Jun 11 2019
(Sage) ((1-x^2-2*x^3+x^4)/((1+x^3)*(1-x-x^2))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 11 2019
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Jean-François Alcover and Paul Curtz, Aug 16 2017
STATUS
approved