login
A087831
a(n) = a(abs(n-a(n-1))) + a(a(abs(n-a(n-4)))) if n>4, a(n) = 1 otherwise.
2
1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 7, 6, 7, 7, 7, 7, 7, 10, 7, 10, 10, 8, 10, 10, 10, 11, 10, 14, 10, 13, 14, 14, 11, 14, 14, 11, 15, 14, 14, 15, 15, 15, 18, 15, 17, 15, 18, 17, 19, 19, 18, 19, 19, 19, 16, 20, 20, 19, 20, 20, 20, 20, 23, 20, 22, 20, 23, 22, 23, 25
OFFSET
0,6
COMMENTS
Second type of triple recursion for the skip two Hofstadter Q.
MATHEMATICA
Hofstadter14[n_Integer?Positive] := Hofstadter14[n] = Hofstadter14[Abs[n - Hofstadter14[n-1]]] + Hofstadter14[ Hofstadter14[Abs[n - Hofstadter14[n-4]]]] Hofstadter14[0] = Hofstadter14[1] = Hofstadter14[2]= Hofstadter14[3]= Hofstadter14[4]= 1 digits=200 ta=Table[Hofstadter14[n], {n, 1, digits}]
CROSSREFS
Cf. A005185.
Sequence in context: A341510 A196238 A087843 * A351960 A372759 A194327
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Oct 06 2003
EXTENSIONS
Inserted a(0)=1 by Paolo P. Lava, Mar 12 2012
STATUS
approved