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”).

A283888
Relative of Hofstadter Q-sequence: a(n) = max(0, n+27298) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.
5
6, 27299, 27300, 27301, 9, 27302, 27303, 27304, 12, 27305, 27306, 27307, 15, 27308, 27309, 17, 27311, 18, 27311, 27313, 27314, 22, 21, 54607, 54601, 9, 18, 54616, 54619, 27307, 22, 27328, 27333, 27311, 27, 36, 27335, 54606, 27302, 39
OFFSET
1,1
COMMENTS
Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 27298 terms.
Most terms in this sequence appear in a long pattern stretching from a(85652) through a(141867984), of 16 interleaved sequences.
This sequence has exactly 141868181 terms (of positive index). a(141868181) = 0, so an attempt to calculate a(141868182) would refer to itself.
FORMULA
If the index is between 67 and 27299 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+27300, a(7n+2) = 7n+27302, a(7n+3) = 7, a(7n+4) = 2n+54641, a(7n+5) = n+54589, a(7n+6) = 27296.
MAPLE
A283888:=proc(n) option remember: if n <= 0 then max(0, n+27298): else A283888(n-A283888(n-1)) + A283888(n-A283888(n-2)) + A283888(n-A283888(n-3)): fi: end:
KEYWORD
nonn,fini
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved