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.

A367087 Number of solutions to +- 1 +- 3 +- 5 +- 7 +- ... +- (2*n-1) = 0 or 1.

Original entry on oeis.org

1, 1, 0, 1, 2, 2, 2, 5, 8, 13, 20, 38, 68, 118, 206, 380, 692, 1262, 2306, 4277, 7930, 14745, 27492, 51541, 96792, 182182, 343670, 650095, 1231932, 2338706, 4447510, 8472697, 16164914, 30884150, 59086618, 113189168, 217091832, 416839177, 801247614, 1541726967, 2969432270
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 26 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n>i^2, 0,
          `if`(i=0, 1, b(n+2*i-1, i-1)+b(abs(n-2*i+1), i-1)))
        end:
    a:=n-> b(irem(n, 2), n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jan 26 2024
  • Mathematica
    b[n_, i_] := b[n, i] = If[n > i^2, 0,
       If[i == 0, 1, b[n+2*i-1, i-1] + b[Abs[n-2*i+1], i-1]]];
    a[n_] := b[Mod[n, 2], n];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 03 2025, after Alois P. Heinz *)