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.

A141126 a(n+1) = a(n)-n^2 if positive and new, else a(n+1) = a(n)+n^2; a(0)=1.

Original entry on oeis.org

1, 1, 2, 6, 15, 31, 56, 20, 69, 5, 86, 186, 65, 209, 40, 236, 11, 267, 556, 232, 593, 193, 634, 150, 679, 103, 728, 52, 781, 1565, 724, 1624, 663, 1687, 598, 1754, 529, 1825, 456, 1900, 379, 1979, 298, 2062, 213, 2149, 124, 2240, 4449, 2145, 4546, 2046, 4647
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 05 2008

Keywords

Crossrefs

Cf. A063733.

Programs

  • Mathematica
    s={1};Do[nx=s[[-1]]-n^2;If[nx>0&&!MemberQ[s,nx],AppendTo[s,nx],AppendTo[s,nx+2n^2]],{n,0,51}];s (* James C. McMahon, Jul 17 2025 *)