OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
O.g.f.: x*(x^8+16*x^7-4*x^6+176*x^5+6*x^4+176*x^3-4*x^2+16*x+1)/((-1+x)^6*(1+x)^5) - R. J. Mathar, May 17 2008
MAPLE
a:= n-> (Matrix([[275, 274, 18, 17, 1, 0, 0, -1, -17, -18, -274]]). Matrix(11, (i, j)-> if (i=j-1) then 1 elif j=1 then [1, 5, -5, -10, 10, 10, -10, -5, 5, 1, -1][i] else 0 fi)^n)[1, 6]: seq(a(n), n=1..33); # Alois P. Heinz, Aug 06 2008
MATHEMATICA
a = {}; r = 0; s = 4; Do[k = 0; Do[k = k + (Sin[Pi m/2]^2) m^r + (Cos[Pi m/2]^2) m^s, {m, 1, n}]; AppendTo[a, k], {n, 1, 100}]; a (* Artur Jasinski *)
nxt[{n_, a_}]:={n+1, If[OddQ[n+1], a+1, a+(n+1)^4]}; Transpose[ NestList[ nxt, {1, 1}, 40]][[2]] (* Harvey P. Dale, Dec 24 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, May 12 2008
STATUS
approved