login
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

%I #17 Oct 08 2018 17:21:46

%S 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,

%T 13,22,24,15,18,23,21,18,20,23,23,21,24,24,24,23,24,24,24,24,24,40,48,

%U 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

%N 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.

%C 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.

%H Altug Alkan, <a href="/A287771/a287771.png">Scatterplot of a(n) for n <= 3*2^19+1</a>

%p A287771:= proc(n) option remember; procname(procname(procname(n-1)) +procname(n-procname(n-1))) +procname(n-procname(n-2)) end proc:

%p A287771(1):= 1: A287771(2):= 1: A287771(3):= 1:

%p map(A287771, [$1..1000]);

%o (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])

%Y Cf. A004001, A005185, A287654, A287707.

%K nonn

%O 1,4

%A _Altug Alkan_, May 31 2017