OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: -x*(x^2+1)*(x^6-16*x^5-3*x^4-160*x^3+3*x^2-16*x-1)/((1+x)^5*(x-1)^6). [From R. J. Mathar, Feb 22 2009]
MATHEMATICA
a = {}; r = 1; 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+n+1, a+(n+1)^4]}; Transpose[NestList[nxt, {1, 1}, 40]][[2]] (* Harvey P. Dale, Mar 19 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, May 12 2008
STATUS
approved