cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Artur Jasinski, May 12 2008

Keywords

Crossrefs

Programs

  • 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 *)

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]