login
A222170
a(n) = n^2 + 2*floor(n^2/3).
1
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,3
COMMENTS
Also, a(n) = n^2 + floor(2*n^2/3), since 2*floor(n^2/3) = floor(2*n^2/3).
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
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 *)
PROG
(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
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).
Sequence in context: A190515 A051940 A020207 * A151762 A213791 A008440
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Aug 08 2013
STATUS
approved