login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A089029
a(n)=n if Hofstadter's Q-sequence increases A005185(n-1)->A005185(n), a(n)=1 otherwise.
0
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,2
COMMENTS
a(n)=n if Q(n) > Q(n-1), and a(n) =1 if Q(n) <= Q(n-1).
FORMULA
a(n) = n if A081827(n-1)>0; a(n) = 1 if A081827(n-1) <=0. [R. J. Mathar, Dec 08 2010]
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}]
CROSSREFS
Sequence in context: A254525 A132179 A378210 * A131226 A286577 A175323
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Nov 12 2003
STATUS
approved