login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A283894
Relative of Hofstadter Q-sequence: a(1) = 17, a(2) = 2; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
5
17, 2, 17, 2, 17, 2, 17, 2, 17, 2, 17, 2, 17, 2, 17, 2, 17, 19, 2, 36, 2, 36, 2, 36, 2, 36, 2, 36, 2, 36, 2, 36, 2, 36, 2, 36, 19, 4, 38, 38, 34, 4, 55, 38, 17, 4, 91, 38, 17, 4, 127, 38, 17, 21, 40, 4, 34, 57, 4, 21, 72, 34, 2, 70, 2, 70, 2, 70, 2, 70, 19, 19, 42, 76, 2
OFFSET
1,1
COMMENTS
In calculating terms of this sequence, use the convention that a(n)=0 for n <= 0.
Most terms in this sequence alternate between 2 and a large number. Such runs of terms are separated by 102 other terms, and each run is approximately twice as long as the previous.
FORMULA
For nonnegative integers i, if 1 <= 2n + r <= 594*2^(i+1) - 2, then
a(594*2^i + 100 + 2n) = 2
a(594*2^i + 100 + 2n + 1) = 594*2^(i+1) - 2.
MAPLE
A283894:=proc(n) option remember: if n <= 0 then 0: elif n = 1 then 17: elif n = 2 then 2: else A283894(n-A283894(n-1)) + A283894(n-A283894(n-2)): fi: end:
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved