login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A140146
a(1)=1, a(n)=a(n-1)+n^1 if n odd, a(n)=a(n-1)+ n^4 if n is even.
2
1, 17, 20, 276, 281, 1577, 1584, 5680, 5689, 15689, 15700, 36436, 36449, 74865, 74880, 140416, 140433, 245409, 245428, 405428, 405449, 639705, 639728, 971504, 971529, 1428505, 1428532, 2043188, 2043217, 2853217, 2853248, 3901824, 3901857
OFFSET
1,2
LINKS
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 *)
KEYWORD
nonn
AUTHOR
Artur Jasinski, May 12 2008
STATUS
approved