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.

A320297 a(n) = a(n-1-a(a(a(n-1)))) + a(a(a(a(n-1)))) for n > 1, a(n) = n for n < 2.

Original entry on oeis.org

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

Views

Author

David S. Newman, Oct 09 2018

Keywords

Comments

This sequence hits every positive integer.

Crossrefs

Cf. A320063.

Programs

  • GAP
    a:=[1,1];; for n in [3..80] do a[n]:=a[n-1-a[a[a[n-1]]]]+a[a[a[a[n-1]]]]; od; Concatenation([0],a); # Muniru A Asiru, Oct 28 2018
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = +a[n - 1 - a[a[n - 1]]] + a[a[a[n - 1]]];
    Table[a[i], {i, 1, 300}]

Formula

a(n+1) - a(n) = 0 or 1 for all n >= 0.
Showing 1-1 of 1 results.