OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 3, -3, 0, -3, 3, 0, 1, -1).
FORMULA
a(n) = a(n-1) + 3*a(n-3) - 3*a(n-4) - 3*a(n-6) + 3*a(n-7) + a(n-9) - a(n-10).
a(n) = 3*a(n-3) - 3*a(n-6) + a(n-9) + 320.
a(n) = (phi(n)+3)*(phi(n)+12)(5*phi(n)-3)/4374, where phi(n) = 12*n - 3*cos(2*n*pi/3) + sqrt(3)*sin(2*n*pi/3).
G. f. 2*x*(4+9*x+17*x^2+56*x^3+29*x^4+23*x^5+20*x^6+2*x^7) / ((1-x)^4*(1+x+x^2)^3).
EXAMPLE
The sequence of heptagonal pyramidal numbers A002413(n) begins 1, 8, 26, 60, 115, 196, 308, 456, 645, 880, … As the third even term is 60, then a(3) = 60.
MATHEMATICA
LinearRecurrence[{1, 0, 3, -3, 0, -3, 3, 0, 1, -1}, {8, 26, 60, 196, 308, 456, 880, 1166, 1508, 2380}, 40]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ant King, Oct 26 2012
STATUS
approved