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.

Showing 1-1 of 1 results.

A087816 a(n) = a(a(n-1)) + a(n - 1 - a(n-1)) with a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 6, 7, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 11, 12, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19, 19, 20, 21, 21, 21, 22, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 34, 34, 34
Offset: 1

Views

Author

Roger L. Bagula, Oct 05 2003

Keywords

Crossrefs

Programs

  • Maple
    A087816 := proc(n) option remember; if n <= 2 then 1 else procname(procname(n-1)) + procname(n - 1 - procname(n-1)); fi; end;
    seq(A087816(n), n = 1..100); # Peter Bala, Sep 11 2022
  • Mathematica
    hg[n_Integer?Positive] := hg[n] =hg[hg[n-1]] + hg[n -1- hg[n-1]] hg[1] = hg[2] = 1 digits=2^8 a=Table[hg[n], {n, 1, digits}]

Formula

From Peter Bala, Sep 11 2022: (Start)
a(n) = n + 1 - A004001(n+1).
a(n) = A080677(n+1) - 1.
a(n+1) - a(n) = 0 or 1. (End)
Showing 1-1 of 1 results.