OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,1,-5,-1,1).
FORMULA
a(n) = A000217(A000045(n+1)) + A000217(A000045(n-1)-1) - A000290(A000045(n)). - R. J. Mathar, Jul 06 2009
From Colin Barker, Feb 25 2019: (Start)
G.f.: x^2*(2 - 4*x - x^2 + x^3) / ((1 + x)*(1 - 3*x + x^2)*(1 - x - x^2)).
a(n) = 3*a(n-1) + a(n-2) - 5*a(n-3) - a(n-4) + a(n-5) for n>4.
(End)
EXAMPLE
a(1) = 0 = 1 - 1.
a(2) = 2 = 3 - 1.
a(3) = 2 = 5 - 3.
a(4) = 7 = 12 - 5.
a(5) = 14 = 26 - 12.
a(6) = 37 = 63 - 26.
MAPLE
PROG
(PARI) concat(0, Vec(x^2*(2 - 4*x - x^2 + x^3) / ((1 + x)*(1 - 3*x + x^2)*(1 - x - x^2)) + O(x^40))) \\ Colin Barker, Feb 25 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Jul 04 2009
EXTENSIONS
a(21) corrected by R. J. Mathar, Jul 05 2009
STATUS
approved