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

A373237
Relative of Hofstadter Q-sequence: a(n) = max(0, n+4315) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.
7
6, 4316, 4317, 4318, 9, 4319, 4320, 4321, 12, 4322, 4323, 4324, 15, 4325, 4326, 17, 4328, 18, 4328, 4330, 4331, 22, 21, 8641, 8635, 9, 18, 8650, 8653, 4324, 22, 4345, 4350, 4328, 27, 36, 4352, 8640, 4319, 39, 4353, 4359, 4323, 42, 4355, 4362, 16, 4354, 4362, 4342, 40, 4354, 55, 8654, 4331, 46, 4364, 4375, 25, 38, 58, 17311, 8644
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 4315 terms.
This sequence has exactly 4875 terms (of positive index). a(4875) = 0, so an attempt to calculate a(4876) would refer to itself.
Without the convention that a(n) = 0 for n <= -4315, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-8616).
If 4315 in this sequence's definition is replaced by any larger number congruent to 3 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.
FORMULA
If the index is between 67 and 4313 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+4317, a(7n+2) = 7n+4319, a(7n+3) = 7, a(7n+4) = 2n+8675, a(7n+5) = n+8623, a(7n+6) = 4313.
KEYWORD
nonn,fini,full
AUTHOR
Nathan Fox, May 28 2024
STATUS
approved