login
A283902
Relative of Hofstadter Q-sequence: a(-701) = 4, a(-700) = 702, a(-699) = 4, a(-698) = 702; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
5
8, 1404, 4, 702, 12, 1404, 4, 702, 16, 1404, 4, 702, 20, 1404, 4, 702, 24, 1404, 4, 702, 28, 1404, 4, 702, 32, 1404, 4, 702, 36, 1404, 4, 702, 40, 1404, 4, 702, 44, 1404, 4, 702, 48, 1404, 4, 702, 52, 1404, 4, 702, 56, 1404, 4, 702, 60, 1404, 4
OFFSET
1,1
COMMENTS
In calculating terms of this sequence, use the convention that a(n)=0 for n<=-702.
Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then begin with 702 terms consisting entirely of alternating 4 and 702.
This sequence has exactly 11969 terms, since a(11969)=0 and computing a(11970) would refer to itself.
From Chai Wah Wu, Jul 26 2020: (Start)
a(n) = 2*a(n-4) - a(n-8) for 8 < n <= 702.
a(n) = a(n-4) + a(n-8) - a(n-12) for 713 < n <= 1410.
a(n) = a(n-4) + a(n-12) - a(n-16) for 1423 < n <= 2106.
(End)
MAPLE
A283902:=proc(n) option remember: if n <= -702 then 0: elif n = -701 then 4: elif n = -700 then 702: elif n = -699 then 4: elif n = -698 then 702: else A283902(n-A283902(n-1)) + A283902(n-A283902(n-2)): fi: end:
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved