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.

A222170 a(n) = n^2 + 2*floor(n^2/3).

Original entry on oeis.org

0, 1, 6, 15, 26, 41, 60, 81, 106, 135, 166, 201, 240, 281, 326, 375, 426, 481, 540, 601, 666, 735, 806, 881, 960, 1041, 1126, 1215, 1306, 1401, 1500, 1601, 1706, 1815, 1926, 2041, 2160, 2281, 2406, 2535, 2666, 2801, 2940, 3081, 3226, 3375, 3526, 3681, 3840
Offset: 0

Views

Author

Bruno Berselli, Aug 08 2013

Keywords

Comments

Also, a(n) = n^2 + floor(2*n^2/3), since 2*floor(n^2/3) = floor(2*n^2/3).

Crossrefs

Subsequence of A008851.
Cf. A004773 (numbers of the type n+floor(n/3)), A008810 (numbers of the type n^2-2*floor(n^2/3)), A047220 (numbers of the type n+floor(2*n/3)), A184637 (numbers of the type n^2+floor(n^2/3), except the first two).

Programs

  • Magma
    [n^2+2*Floor(n^2/3): n in [0..50]];
    
  • Magma
    I:=[0,1,6,15,26]; [n le 5 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-3)-2*Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Aug 18 2013
  • Mathematica
    Table[n^2 + 2 Floor[n^2/3], {n, 0, 50}]
    CoefficientList[Series[x (1 + x) (1 + 3 x + x^2) / ((1 + x + x^2) (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2013 *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {0, 1, 6, 15, 26}, 50] (* Hugo Pfoertner, Jan 17 2023 *)

Formula

G.f.: x*(1+x)*(1 + 3*x + x^2)/((1 + x + x^2)*(1-x)^3).
a(n) = a(-n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
a(n) = floor(5*n^2/3). - Wesley Ivan Hurt, Mar 16 2015
a(n) = a(n-3) + 5*(2n-3) [Tadeusz Dorozinski]. - Eduard Baumann, Jan 18 2023