%I #18 Dec 07 2017 03:00:23
%S 2,4,2,2,4,6,4,6,6,4,8,8,8,12,6,6,16,12,6,18,8,14,12,12,16,16,16,16,
%T 16,24,10,20,20,24,14,22,18,24,14,22,22,36,12,26,26,36,16,28,28,28,24,
%U 28,32,30,28,32,32,32,32,32,32,48,16,34,38,36,26,56,20,40,34,44,30,50,42,40,32,60,22,50,42,42,44
%N a(1) = a(3) = a(4) = 2, a(2) = 4; a(n) = a(n-a(n-1)) + a(n-a(n-2)) for n > 4.
%C See scatterplots in Links section to observe the distribution of terms.
%H Altug Alkan, <a href="/A294354/a294354.png">Scatterplot of a(n) for n <= 10^5</a>
%H Altug Alkan, <a href="/A294354/a294354_1.png">Alternative scatterplot of a(n) for n <= 10^5</a>
%t Fold[Append[#1, #1[[#2 - #1[[#2 - 1]] ]] + #1[[#2 - #1[[#2 - 2]] ]]] &, {2, 4, 2, 2}, Range[5, 83]] (* _Michael De Vlieger_, Oct 30 2017 *)
%o (PARI) q=vector(10^5); q[1]=q[3]=q[4]=2;q[2]=4; for(n=5, #q, q[n] = q[n-q[n-1]]+q[n-q[n-2]]); q
%Y Cf. A005185.
%K nonn
%O 1,1
%A _Altug Alkan_, Oct 29 2017
|