OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
Odd numbers of the form n*(n+1)*(4n-1)/6.
From Ant King, Oct 25 2012: (Start)
a(n) = a(n-1) +3*a(n-2) -3*a(n-3) -3*a(n-4) +3*a(n-5) +a(n-6) -a(n-7).
a(n) = 3*a(n-2) -3*a(n-4) +a(n-6) +256.
a(n) = (8*n-2*(-1)^n-7)*(1+(-1)^n-4*n)*(3+(-1)^n-4*n)/24.
G.f.: x*(1+6*x+85*x^2+48*x^3+103*x^4+10*x^5+3*x^6) / ((1-x)^4*(1+x)^3). (End)
E.g.f.: (1/6)*(-9 - 6*x - 24*x^2 + 18*exp(x) + ( - 9 + 12*x + 36*x^2 + 32*x^3)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 30 2016
MATHEMATICA
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 7, 95, 161, 525, 715, 1547}, 36] (* Ant King, Oct 25 2012 *)
PROG
(PARI) a(n)=(8*n-2*(-1)^n-7)*(1+(-1)^n-4*n)*(3+(-1)^n-4*n)/24 \\ Charles R Greathouse IV, Jul 30 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
STATUS
approved