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.

A135214 a(1)=1, a(n) = a(n-1) + n^5 if n odd, a(n) = a(n-1) + n^4 if n is even.

Original entry on oeis.org

1, 17, 260, 516, 3641, 4937, 21744, 25840, 84889, 94889, 255940, 276676, 647969, 686385, 1445760, 1511296, 2931153, 3036129, 5512228, 5672228, 9756329, 9990585, 16426928, 16758704, 26524329, 26981305, 41330212, 41944868, 62456017
Offset: 1

Views

Author

Artur Jasinski, May 12 2008

Keywords

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1 + x^2)*(x^8 - 16*x^7 + 236*x^6 - 144*x^5 + 1446*x^4 + 144*x^3 + 236*x^2 + 16*x + 1)/((1-x)^7 *(1+x)^6))) // G. C. Greubel, Jul 04 2018
  • Mathematica
    a = {}; r = 5; 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
    LinearRecurrence[{1, 6, -6, -15, 15, 20, -20, -15, 15, 6, -6, -1, 1}, {1, 17, 260, 516, 3641, 4937, 21744, 25840, 84889, 94889, 255940, 276676, 647969}, 50] (* G. C. Greubel, Oct 04 2016 *)
  • PARI
    x='x+O('x^50); Vec(x*(1 + x^2)*(x^8 - 16*x^7 + 236*x^6 - 144*x^5 + 1446*x^4 + 144*x^3 + 236*x^2 + 16*x + 1)/((1-x)^7 *(1+x)^6)) \\ G. C. Greubel, Jul 04 2018
    

Formula

From R. J. Mathar, May 17 2008: (Start)
O.g.f.: x*(1 + x^2)*(x^8 - 16*x^7 + 236*x^6 - 144*x^5 + 1446*x^4 + 144*x^3 + 236*x^2 + 16*x + 1)/((1-x)^7 *(1+x)^6).
a(2*n-1) = n*(-8 + 80*n^2 + 48*n^4 + 80*n^5 + 35*n - 220*n^3)/15.
a(2*n) = n*(-8 + 80*n^2 + 48*n^4 + 80*n^5 + 35*n + 20*n^3)/15 . (End)