OFFSET
1,2
COMMENTS
FORMULA
G.f.: x*(1 + 7*x + 30*x^2 + 16*x^3 + 39*x^4 + x^5 + 2*x^6)/((1+x)^3*(1-x)^3). - Klaus Brockhaus, Jan 04 2009
From Walter Carlini, Jan 12 2009: (Start)
a(n) = 3n^2 - 3n + 1 if n is 1 or an even number;
a(n) = 9n^2 - 21n + 15 if n is any odd number other than 1. (End)
EXAMPLE
a(1)=1, a(2)=2^3-a(1)=8-1=7, a(3)=3^3+a(2)-a(1)=27+7-1=33, a(4)=64-33+7-1=37, a(5)=125+37-33+7-1=135, a(6)=216-135+37-33+7-1=91, etc.
PROG
(Magma) S:=[ 1 ]; for n in [2..45] do Append(~S, n^3 + &+[ (-1)^j*S[j]: j in [1..n-1] ]); end for; S; // Klaus Brockhaus, Jan 04 2009
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Walter Carlini, Dec 23 2008, Jan 01 2009
EXTENSIONS
Extended beyond a(30) by Klaus Brockhaus, Jan 04 2009
G.f. corrected by Klaus Brockhaus, Oct 15 2009
STATUS
approved