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.

A278059 Relative of Hofstadter Q-sequence: a(n) = n for 1 <= n <= 7; a(n) = a(n-a(n-1)) + a(n-a(n-2)) for n > 7.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 3, 8, 9, 5, 10, 6, 7, 11, 13, 10, 8, 13, 17, 7, 16, 20, 7, 13, 19, 10, 16, 19, 12, 23, 25, 12, 24, 25, 15, 26, 30, 14, 28, 16, 26, 20, 15, 25, 30, 26, 24, 33, 29, 24, 36, 29, 21, 43, 31, 26, 35, 19, 29, 51, 17, 40, 33, 38, 28
Offset: 1

Views

Author

Nathan Fox, Nov 10 2016

Keywords

Comments

Similar to Hofstadter's Q-sequence A005185 but with different starting values.
Much like the Hofstadter Q-sequence, it is not known if this sequence is defined for all positive n.
a(n) exists for n <= 3*10^7.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[0 < n < 8, n, a[n-a[n-1]] + a[n-a[n-2]]];
    Array[a, 100] (* Paolo Xausa, May 29 2024 *)