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.

A272058 Start with all terms set to 0. Then add n to the next n+3 terms for n=0,1,2,... .

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 14, 20, 25, 33, 39, 49, 56, 68, 76, 90, 99, 115, 125, 143, 154, 174, 186, 208, 221, 245, 259, 285, 300, 328, 344, 374, 391, 423, 441, 475, 494, 530, 550, 588, 609, 649, 671, 713, 736, 780, 804, 850, 875, 923, 949, 999, 1026, 1078, 1106
Offset: 0

Views

Author

Wesley Ivan Hurt, Apr 19 2016

Keywords

Examples

			n  | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, ...
__________________________________________
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
+       0, 0, 0
+          1, 1, 1, 1,
+             2, 2, 2, 2, 2
+                3, 3, 3, 3, 3, 3
+                   4, 4, 4, 4, 4, 4, 4
+                      5, 5, 5, 5, 5, 5, 5, 5
+                         6, 6, 6, 6, 6, 6, 6, 6, 6
+                            7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+                               8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
+                                  9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
+                                     ...
__________________________________________
a(n)|0, 0, 1, 3, 6,10,14,20,25,33,39, ...
		

Crossrefs

Programs

  • Magma
    [0,0] cat [(6*n^2+6*n-23+(7-2*n)*(-1)^n)/16 : n in [2..100]];
  • Maple
    A272058:=n->(6*n^2+6*n-23+(7-2*n)*(-1)^n)/16: 0,0,seq(A272058(n),n=2..100);
  • Mathematica
    CoefficientList[Series[x^2*(1 + 2 x + x^2 - x^4)/((1 - x)^3*(1 + x)^2), {x, 0, 50}], x] (* or *)
    LinearRecurrence[{1, 2, -2, -1, 1, 0, 0}, {0, 0, 1, 3, 6, 10, 14}, 60]

Formula

G.f.: x^2*(1 + 2*x + x^2 - x^4)/((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 6.
a(n) = (6*n^2 + 6*n - 23 + (7 - 2*n)*(-1)^n)/16 for n > 1.
a(n) = floor((n+3)/4) * floor((3*n-4)/2) + (floor((n-1)/2) mod 2) * floor((3*n-3)/4) for n > 1.
For n > 1, a(2n) = A095794(n). - Jon E. Schoenfield, Feb 19 2022