OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 3, -3, -3, 3, 1, -1).
FORMULA
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) + 384
a(n) = (4*n-(-1)^n+1)*(4*n-(-1)^n+3)*(4*n-(-1)^n)/8
G. f. 2*x(15+20*x+102*x^2+28*x^3+27*x^4)/((1-x)^4*(1+x)^3)
EXAMPLE
The sequence of octagonal pyramidal numbers A002414 begins 1, 9, 30, 70, 135, 231, 364, 540, 765, 1045, … As the third even term is 364, then a(3) = 364.
MATHEMATICA
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {30, 70, 364, 540, 1386, 1794, 3480}, 37]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ant King, Oct 27 2012
STATUS
approved