login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #6 Mar 19 2017 19:25:01

%S 6,27299,27300,27301,9,27302,27303,27304,12,27305,27306,27307,15,

%T 27308,27309,17,27311,18,27311,27313,27314,22,21,54607,54601,9,18,

%U 54616,54619,27307,22,27328,27333,27311,27,36,27335,54606,27302,39

%N 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.

%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 27298 terms.

%C Most terms in this sequence appear in a long pattern stretching from a(85652) through a(141867984), of 16 interleaved sequences.

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

%H Nathan Fox, <a href="/A283888/b283888.txt">Table of n, a(n) for n = 1..90000</a>

%F 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.

%p 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:

%Y Cf. A005185, A267501, A274058, A278055, A278066, A283884, A283885, A283886, A283887.

%K nonn,fini

%O 1,1

%A _Nathan Fox_, Mar 19 2017