login

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

A283899
Relative of Hofstadter Q-sequence: a(-399) = 400, a(-398) = 4, a(-397) = 400, a(-396) = 4; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
5
800, 4, 400, 8, 800, 4, 400, 12, 800, 4, 400, 16, 800, 4, 400, 20, 800, 4, 400, 24, 800, 4, 400, 28, 800, 4, 400, 32, 800, 4, 400, 36, 800, 4, 400, 40, 800, 4, 400, 44, 800, 4, 400, 48, 800, 4, 400, 52, 800, 4, 400, 56, 800, 4, 400, 60
OFFSET
1,1
COMMENTS
In calculating terms of this sequence, use the convention that a(n)=0 for n<=-400.
Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then begin with 400 terms consisting entirely of alternating 4 and 400.
This sequence has exactly 465 terms, since a(465)=0 and computing a(466) would refer to itself.
MAPLE
A283899:=proc(n) option remember: if n <= -400 then 0: elif n = -399 then 400: elif n = -398 then 4: elif n = -397 then 400: elif n = -396 then 4: else A283899(n-A283899(n-1)) + A283899(n-A283899(n-2)): fi: end:
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved