%I #45 Dec 18 2017 11:44:50
%S 1,1,3,4,4,5,7,8,6,8,10,10,10,12,11,13,13,15,14,16,16,18,18,18,21,20,
%T 18,23,21,23,24,24,20,28,28,29,20,29,30,34,27,29,31,34,35,31,33,34,39,
%U 36,34,38,38,42,36,43,39,43,42,44,42,47,43,47,48,47,46,50,50,50,48,54,53,52,52,54,60,53,55,55,63
%N a(1) = a(2) = 1, a(3) = 3, a(4) = a(5) = 4; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 5.
%C With five initial conditions, this sequence has the longest chaotic life for the recurrence a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) where 1 <= a(i) <= 5 with 1 <= i <= 5. It is not known if this sequence is defined for all positive n. See plot of this sequence in Links section.
%H Hans Havermann, <a href="/A292351/a292351_1.png">Scatterplot of a(n) for n <= 10^7</a>
%o (PARI) q=vector(10^5); q[1]=1; q[2]=1; q[3]=3; q[4]=4; q[5]=4; for(n=6, #q, q[n] = q[n-q[n-1]]+q[n-q[n-2]]+q[n-q[n-3]]); q
%o (Scheme, with memoization-macro definec) (definec (A292351 n) (cond ((<= n 2) 1) ((= 3 n) 3) ((<= n 5) 4) (else (+ (A292351 (- n (A292351 (- n 1)))) (A292351 (- n (A292351 (- n 2)))) (A292351 (- n (A292351 (- n 3)))))))) ;; _Antti Karttunen_, Dec 13 2017
%Y Cf. A278055, A296413, A296440.
%K nonn
%O 1,3
%A _Altug Alkan_, Dec 12 2017