OFFSET
0,1
COMMENTS
The array of successive differences begins:
2, 3, 5, 7, 11, 18, 30, 49, 79, 127, ... = a(n)
1, 2, 2, 4, 7, 12, 19, 30, 48, 78, ... = b(n)
1, 0, 2, 3, 5, 7, 11, 18, 30, 49, ... = a(n-2)
-1, 2, 1, 2, 2, 4, 7, 12, 19, 30, ... = b(n-2)
3, -1, 1, 0, 2, 3, 5, 7, 11, 18, ... = a(n-4)
...
Main diagonal is 2,2,2,... = A007395.
LINKS
OEIS Wiki, Autosequence
Index entries for linear recurrences with constant coefficients, signature (2, -1, 0, 1).
FORMULA
G.f.: (2 - x + x^2)/(1 - 2*x + x^2 - x^4).
a(3n) = A097924(n).
a(3n) + a(3n+1) = a(3n+2).
a(n) = (1/15)*2^(-n-1)*((30-9*sqrt(5))*(1-sqrt(5))^n + (1+sqrt(5))^n*(30 + 9*sqrt(5)) + 5*2^(n+1)*sqrt(3)*sin(n*Pi/3)).
MATHEMATICA
LinearRecurrence[{2, -1, 0, 1}, {2, 3, 5, 7}, 40]
PROG
(GAP)
L:=[2, 3, 5, 7];; for i in [5..10^3] do L[i]:=2*L[i-1]-L[i-2]+L[i-4]; od; L; # Muniru A Asiru, Sep 02 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-François Alcover and Paul Curtz, Aug 31 2017
STATUS
approved