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.

A152728 a(n) + a(n+1) + a(n+2) = n^3.

Original entry on oeis.org

0, 0, 0, 1, 7, 19, 38, 68, 110, 165, 237, 327, 436, 568, 724, 905, 1115, 1355, 1626, 1932, 2274, 2653, 3073, 3535, 4040, 4592, 5192, 5841, 6543, 7299, 8110, 8980, 9910, 10901, 11957, 13079, 14268, 15528, 16860, 18265, 19747, 21307, 22946, 24668, 26474
Offset: 0

Views

Author

Keywords

Comments

The differences between the terms are (1) a(3*k) - a(3*k-1) = 9*k*(k-1)+1; (2) otherwise, a(n) - a(n-1) = (n-2)*(n-1). - J. M. Bergot, Jul 10 2013
Second differences give A047266. - J. M. Bergot, Dec 01 2014

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); [0,0,0] cat Coefficients(R!(x^3*(1+4*x+x^2)/((1+x+x^2)*(x-1)^4))); // G. C. Greubel, Sep 01 2018
  • Maple
    seq(ceil((n^3 - 3*n^2 + n)/3), n=0..100); # Robert Israel, Dec 01 2014
  • Mathematica
    k0=k1=0;lst={k0,k1};Do[kt=k1;k1=n^3-k1-k0;k0=kt;AppendTo[lst,k1],{n,1,4!}];lst
    LinearRecurrence[{3,-3,2,-3,3,-1}, {0,0,0,1,7,19}, 50] (* G. C. Greubel, Sep 01 2018 *)
  • PARI
    x='x+O('x^50); concat([0,0,0], Vec(x^3*(1+4*x+x^2)/((1+x+x^2)*(x -1)^4 ))) \\ G. C. Greubel, Sep 01 2018
    

Formula

From R. J. Mathar, Aug 15 2010: (Start)
a(n) = ( (n-1)*(n^2-2*n-1) - A057078(n))/3.
G.f.: x^3*(1+4*x+x^2) / ( (1+x+x^2)*(x-1)^4 ). (End)
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 3*a(n-4) + 3*a(n-5) - a(n-5). - Charles R Greathouse IV, Jul 10 2013
a(3n) = n*(9n^2-9n+1), a(3n+1) = n*(9n^2-2), a(3n+2) = n*(9n^2+9n+1). - Ralf Stephan, Jul 12 2013
a(n) = ceiling((n^3 - 3*n^2 + n)/3). - Robert Israel, Dec 01 2014
E.g.f.: (3*exp(x)*(1 - x + x^3) - exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Mar 04 2023