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.

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 13, 14, 5, 15, 6, 7, 16, 18, 10, 8, 18, 22, 12, 19, 14, 24, 11, 23, 27, 16, 13, 17, 15, 26, 20, 10, 27, 36, 20, 15, 42, 14, 31, 21, 34, 28, 15, 23, 50, 14, 31, 54, 24, 19, 23, 42, 32, 31, 34, 51, 14, 36, 61, 29, 17, 77
Offset: 1

Views

Author

Nathan Fox, Nov 10 2016

Keywords

Comments

Similar to Hofstadter's Q-sequence A005185 but with different starting values.
This sequence has exactly 69 terms, since a(69)=77 and computing a(70) would refer to a(-7).

Crossrefs

Programs

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