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.

A320259 Terms that are on the y-axis of the square spiral built with 2*k, 2*k+1, 2*k+1 for k >= 0.

Original entry on oeis.org

0, 2, 5, 9, 15, 22, 30, 40, 51, 63, 77, 92, 108, 126, 145, 165, 187, 210, 234, 260, 287, 315, 345, 376, 408, 442, 477, 513, 551, 590, 630, 672, 715, 759, 805, 852, 900, 950, 1001, 1053, 1107, 1162, 1218, 1276, 1335
Offset: 0

Views

Author

Paul Curtz, Oct 08 2018

Keywords

Comments

a(n) mod 9 is of period 27.
The spiral:
28--29--29--30--31--31--32
|
27 13--14--15--15--16--17
| | |
27 13 4---5---5---6 17
| | | | |
26 12 3 0---1 7 18
| | | | | |
25 11 3---2---1 7 19
| | | |
25 11--10---9---9---8 19
| |
24--23--23--22--21--21--20

Examples

			G.f. = 2*x + 5*x^2 + 9*x^3 + 15*x^4 + 22*x^5 + 30*x^6 + ... - _Michael Somos_, Nov 13 2018
		

Crossrefs

Cf. A000969, A004396, A004523, A004767, A004772 (first differences), A211480, A002264, A143978.

Programs

  • GAP
    a:=[0,2,5,9,15];; for n in [6..50] do a[n]:=2*a[n-1]-a[n-2]+a[n-3]-2*a[n-4]+a[n-5]; od; a; # Muniru A Asiru, Oct 08 2018
  • Maple
    seq(coeff(series(x^2*(2+x+x^2)/((1-x)^3*(1+x+x^2)),x,n+1), x, n), n = 1 .. 50); # Muniru A Asiru, Oct 08 2018
  • Mathematica
    LinearRecurrence[{2,-1,1,-2,1}, {0, 2, 5, 9, 15}, 50] (* or *)
    CoefficientList[Series[x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)), {x, 0, 50}], x] (* Stefano Spezia, Oct 09 2018 *)
    a[ n_] := Quotient[(n + 1) (2 n + 1), 3]; (* Michael Somos, Nov 13 2018 *)
  • PARI
    concat(0, Vec(x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)) + O(x^60))) \\ Colin Barker, Oct 08 2018
    
  • PARI
    {a(n) = (n + 1) * (2*n + 1) \ 3}; /* Michael Somos, Nov 13 2018 */
    

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5), a(0)=0, a(1)=2, a(2)=5, a(3)=9, a(4)=15.
a(n) = a(n-1) + A004772(n+1), a(0)=0, n>0.
a(n+15) = a(n-15) + 10*A004767(n).
a(-n-1) = ({0} U A000969(n)) = 0, 1, 3, 7, ... = b(n), the full x-axis terms.
a(-n-1) + a(n) = 0, 3, 8, 16, ... = A211480(n+1).
a(n) = b(n) + A004523(n+1).
G.f.: x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)). - Colin Barker, Oct 08 2018
a(n) = A143978(n) + A002264(n+2).
a(n) = A000969(-2-n) for all n in Z. - Michael Somos, Nov 13 2018