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.

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

Original entry on oeis.org

0, 1, 7, 18, 35, 57, 84, 117, 155, 198, 247, 301, 360, 425, 495, 570, 651, 737, 828, 925, 1027, 1134, 1247, 1365, 1488, 1617, 1751, 1890, 2035, 2185, 2340, 2501, 2667, 2838, 3015, 3197, 3384, 3577, 3775, 3978
Offset: 0

Views

Author

Paul Curtz, Oct 09 2018

Keywords

Comments

Resulting 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
.
a(n) mod 9 is of period 27. a(n) mod 10 is of period 30.
The NE diagonal starting at 1 is A301696. - Klaus Purath, May 15 2021

Crossrefs

Cf. A000969.

Programs

  • Mathematica
    LinearRecurrence[{2,-1,1,-2,1},{0,1,7,18,35},100] (* Paolo Xausa, Nov 13 2023 *)
  • PARI
    concat(0, Vec(x*(1 + 5*x + 5*x^2 + 5*x^3) / ((1 - x)^3*(1 + x + x^2)) + O(x^50))) \\ Colin Barker, Oct 09 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)=1, a(2)=7, a(3)=18, a(4)=35.
a(n+2) - 2*a(n-1) + a(n) = period 3: repeat [5, 5, 6].
a(-n) = 0, 5, 15, 30, 51, 77, 108, 145, ... is the sequence of the terms on the positive y-axis.
G.f.: x*(1 + 5*x + 5*x^2 + 5*x^3) / ((1 - x)^3*(1 + x + x^2)). - Colin Barker, Oct 09 2018