login

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

A287771
a(1) = a(2) = a(3) = 1; a(n) = a(a(a(n-1)) + a(n-a(n-1))) + a(n-a(n-2)) for n > 3.
1
1, 1, 1, 2, 3, 3, 3, 5, 6, 6, 6, 6, 6, 10, 12, 8, 9, 12, 12, 11, 12, 12, 12, 12, 12, 18, 24, 16, 13, 22, 24, 15, 18, 23, 21, 18, 20, 23, 23, 21, 24, 24, 24, 23, 24, 24, 24, 24, 24, 40, 48, 24, 15, 43, 43, 28, 23, 40, 36, 33, 35, 37, 39, 45, 39, 36, 40, 35, 36, 45, 45, 48, 34, 41, 48, 42, 37, 41, 48, 46, 42, 42
OFFSET
1,4
COMMENTS
For n <= 3*2^25, sequence of numbers n such that a(n+1) = a(n) = a(n-1) = a(n-2) = a(n-3) contains numbers of the form 3*2^k for all 2 <= k <= 25. In fact, for n <= 3*2^25 there are only two exceptional terms that are not of the form 3*2^k: 49042 and 49043. Observation of the form of 3*2^k in the sequence that we define above is interesting since form of 3*2^k has an importance for short scale generational behavior of Hofstadter's Q-sequence.
MAPLE
A287771:= proc(n) option remember; procname(procname(procname(n-1)) +procname(n-procname(n-1))) +procname(n-procname(n-2)) end proc:
A287771(1):= 1: A287771(2):= 1: A287771(3):= 1:
map(A287771, [$1..1000]);
PROG
(PARI) q=vector(3*2^19+1); q[1]=q[2]=q[3]=1; for(n=4, #q, q[n]=q [q[q[n-1]]+q[n-q[n-1]]]+q[n-q[n-2]]); vector(3*2^19+1, n, q[n])
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, May 31 2017
STATUS
approved