OFFSET
0,3
REFERENCES
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 1990, p. 327.
LINKS
Index entries for linear recurrences with constant coefficients, signature (3, 0, -6, 3, 3, -2).
FORMULA
a(n) = A006904(n) - (n-1)^2.
From R. J. Mathar, Mar 27 2009: (Start)
a(n) = 3*a(n-1) - 6*a(n-3) + 3*a(n-4) + 3*a(n-5) - 2*a(n-6).
G.f.: x*(1-8*x^2+8*x^3+7*x^4)/((-1+2*x)*(1+x)^2*(x-1)^3). (End)
EXAMPLE
a(0) = (1/9)*(7*2^0 + (-1)^0*(3*0+2)) - (0-1)^2 = (1/9)*(7*1 + 1*(0+2)) - (-1)^2 = (1/9)*(7+2) - 1 = 1 - 1 = 0.
PROG
(Magma) [ (1/9)*(7*2^n+(-1)^n*(3*n+2))-(n-1)^2: n in [0..100] ]; // Vincenzo Librandi, Dec 19 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 08 2008
EXTENSIONS
Definition corrected by D. S. McNeil, Mar 21 2009
STATUS
approved