login
Relative of Hofstadter Q-sequence: a(n) = max(0, n+200) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.
7

%I #8 May 30 2024 22:11:45

%S 6,201,202,203,9,204,205,206,12,207,208,209,15,210,211,17,213,18,213,

%T 215,216,22,21,411,405,9,18,420,423,209,22,230,235,213,27,36,237,410,

%U 204,39,238,244,208,42,240,247,16,239,247,227,40,239,55,424,216,46,249,260,25,38,58,851,414,204,61,71,463,402,198,72,272,274

%N Relative of Hofstadter Q-sequence: a(n) = max(0, n+200) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

%C 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 200 terms.

%C This sequence has exactly 220 terms (of positive index). a(220) = 0, so an attempt to calculate a(221) would refer to itself.

%C Without the convention that a(n) = 0 for n <= -200, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-386).

%C If 200 in this sequence's definition is replaced by any larger number congruent to 4 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

%H Nathan Fox, <a href="/A373238/b373238.txt">Table of n, a(n) for n = 1..220</a>

%F If the index is between 67 and 202 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+202, a(7n+2) = 7n+204, a(7n+3) = 7, a(7n+4) = 2n+445, a(7n+5) = n+393, a(7n+6) = 198.

%Y Cf. A005185, A267501, A278055, A373234, A373235, A373236, A373237, A274058, A373239.

%K nonn,fini,full

%O 1,1

%A _Nathan Fox_, May 28 2024