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.

A089029 a(n)=n if Hofstadter's Q-sequence increases A005185(n-1)->A005185(n), a(n)=1 otherwise.

Original entry on oeis.org

1, 3, 4, 1, 6, 7, 1, 9, 1, 1, 12, 1, 1, 15, 1, 17, 18, 1, 20, 1, 1, 1, 24, 1, 1, 27, 1, 1, 1, 31, 1, 1, 34, 35, 1, 37, 38, 1, 40, 41, 1, 43, 1, 1, 1, 1, 48, 1, 50, 51, 1, 1, 54, 1, 1, 57, 1, 59, 1, 1, 1, 63, 1, 1, 66, 1, 1, 69, 70, 1, 72, 73, 1, 75, 1, 77, 1, 79, 80, 81, 1, 1, 84, 1, 86, 87, 1, 1
Offset: 2

Views

Author

Roger L. Bagula, Nov 12 2003

Keywords

Comments

a(n)=n if Q(n) > Q(n-1), and a(n) =1 if Q(n) <= Q(n-1).

Crossrefs

Programs

  • Mathematica
    Hofstadter[n_Integer?Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-2]] Hofstadter[1] = Hofstadter[2] = 1 digits=200 a=Table[If[Hofstadter[n]-Hofstadter[n-1]>0, n, 1], {n, 2, digits}]

Formula

a(n) = n if A081827(n-1)>0; a(n) = 1 if A081827(n-1) <=0. [R. J. Mathar, Dec 08 2010]