login
A283901
Relative of Hofstadter Q-sequence: a(-310) = 4, a(-309) = 311, a(-308) = 4, a(-307) = 311; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
5
315, 4, 311, 315, 8, 315, 315, 622, 4, 315, 319, 622, 4, 315, 323, 622, 4, 315, 327, 622, 4, 315, 331, 622, 4, 315, 335, 622, 4, 315, 339, 622, 4, 315, 343, 622, 4, 315, 347, 622, 4, 315, 351, 622, 4, 315, 355, 622, 4, 315, 359, 622, 4
OFFSET
1,1
COMMENTS
In calculating terms of this sequence, use the convention that a(n)=0 for n<=-311.
Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then begin with 311 terms consisting entirely of alternating 4's and 311's.
This sequence has exactly 658 terms, since a(658)=0 and computing a(659) would refer to itself.
a(n) = 2*a(n-4) - a(n-8) for 13 < n <= 312 and for 332 < n <= 623. - Chai Wah Wu, Jul 26 2020
MAPLE
A283901:=proc(n) option remember: if n <= -311 then 0: elif n = -310 then 4: elif n = -309 then 311: elif n = -308 then 4: elif n = -307 then 311: else A283901(n-A283901(n-1)) + A283901(n-A283901(n-2)): fi: end:
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved