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.

A363268 Squares (A000290) alternating with 1+squares (A002522).

Original entry on oeis.org

1, 1, 4, 2, 9, 5, 16, 10, 25, 17, 36, 26, 49, 37, 64, 50, 81, 65, 100, 82, 121, 101, 144, 122, 169, 145, 196, 170, 225, 197, 256, 226, 289, 257, 324, 290, 361, 325, 400, 362, 441, 401, 484, 442, 529, 485, 576, 530, 625, 577, 676, 626, 729, 677, 784, 730, 841
Offset: 1

Views

Author

Clark Kimberling, May 24 2023

Keywords

Crossrefs

Programs

  • Mathematica
    c[1] = 1; c[2] = 1;
    c[n_] := If[OddQ[n], c[n - 2] + n, c[n - 1] - n + 2]
    Table[c[n], {n, 1, 120}]

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: (-1 - x^2 + 2 x^3 - 2 x^4)/((-1 + x)^3 (1 + x)^2).