login
A283898
Relative of Hofstadter Q-sequence: a(-311) = 312, a(-310) = 4, a(-309) = 312, a(-308) = 4; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
5
624, 4, 312, 8, 624, 4, 312, 12, 624, 4, 312, 16, 624, 4, 312, 20, 624, 4, 312, 24, 624, 4, 312, 28, 624, 4, 312, 32, 624, 4, 312, 36, 624, 4, 312, 40, 624, 4, 312, 44, 624, 4, 312, 48, 624, 4, 312, 52, 624, 4, 312, 56, 624, 4, 312, 60, 624, 4, 312, 64, 624, 4, 312, 68, 624
OFFSET
1,1
COMMENTS
In calculating terms of this sequence, use the convention that a(n)=0 for n<=-312.
Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then begin with 312 terms consisting entirely of alternating 4 and 312.
This sequence has exactly 6632 terms, since a(6632)=0 and computing a(6633) would refer to itself.
MAPLE
A283898:=proc(n) option remember: if n <= -312 then 0: elif n = -311 then 312: elif n = -310 then 4: elif n = -309 then 312: elif n = -308 then 4: else A283898(n-A283898(n-1)) + A283898(n-A283898(n-2)): fi: end:
MATHEMATICA
A283898[n_] := A283898[n] = Which[n <= -312, 0, n == -311 || n == -309, 312, n == -310 || n == -308, 4, True, A283898[n - A283898[n-1]] + A283898[n - A283898[n-2]]];
Array[A283898, 100] (* Paolo Xausa, May 26 2026 *)
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved