OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: x*(-1-32*x-3*x^2-832*x^3+14*x^4-2112*x^5-14*x^6-832*x^7+3*x^8-32*x^9+x^10 )/((1+x)^6*(x-1)^7). [From R. J. Mathar, Feb 22 2009]
MATHEMATICA
a = {}; r = 2; s = 5; 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[EvenQ[n], a+(n+1)^2, a+(n+1)^5]}; Transpose[ NestList[ nxt, {1, 1}, 30]][[2]] (* Harvey P. Dale, Aug 20 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, May 12 2008
STATUS
approved