login
A283900
Relative of Hofstadter Q-sequence: a(-769) = 770, a(-768) = 4, a(-767) = 770, a(-766) = 4; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
5
1540, 4, 770, 8, 1540, 4, 770, 12, 1540, 4, 770, 16, 1540, 4, 770, 20, 1540, 4, 770, 24, 1540, 4, 770, 28, 1540, 4, 770, 32, 1540, 4, 770, 36, 1540, 4, 770, 40, 1540, 4, 770, 44, 1540, 4, 770, 48, 1540, 4, 770, 52, 1540, 4, 770, 56
OFFSET
1,1
COMMENTS
In calculating terms of this sequence, use the convention that a(n)=0 for n<=-770.
Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then begin with 770 terms consisting entirely of alternating 4 and 770.
This sequence has exactly 8520 terms, since a(8520)=0 and computing a(8521) would refer to itself.
a(n) = 2*a(n-4) - a(n-8) for 8 < n <= 770 and for 782 < n <= 1540. a(n) = a(n-4) + a(n-8) - a(n-12) for 1565 < n <= 2310. - Chai Wah Wu, Jul 26 2020
MAPLE
A283900:=proc(n) option remember: if n <= -770 then 0: elif n = -769 then 770: elif n = -768 then 4: elif n = -767 then 770: elif n = -766 then 4: else A283900(n-A283900(n-1)) + A283900(n-A283900(n-2)): fi: end:
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved