%I #16 Jun 16 2018 07:57:43
%S 1,1,1,2,3,3,3,4,4,5,5,6,7,7,7,7,8,8,9,10,10,11,12,12,13,13,14,14,14,
%T 14,15,15,15,16,17,17,18,18,18,19,20,21,22,22,23,23,24,25,25,26,26,26,
%U 27,27,28,28,28,28,29,29,29,29,30,31,31,32,32,32,33,33,33,33,34,35,36,37,37,38,39,39,39
%N a(1) = a(2) = a(3) = 1; for n > 3, a(n) = a(a(n-2)) + a(n-a(n-2)).
%C A solution to recursion of Mallows's sequence (A005229).
%H Altug Alkan, <a href="/A305845/a305845.png">Plot of n/2 - a(n) for n <= 7*2^10.</a>
%F a(n+1) - a(n) = 0 or 1 for all n >= 1.
%t a[1] = a[2] = a[3] = 1; a[n_] := a[n] = a[a[n - 2]] + a[n - a[n - 2]]; Array[a, 81] (* _Michael De Vlieger_, Jun 11 2018 *)
%o (PARI) a=vector(100); a[1]=a[2]=a[3]=1; for(n=4, #a, a[n] = a[a[n-2]] + a[n-a[n-2]]); a
%Y Cf. A004001, A005229, A005350.
%K nonn,easy
%O 1,4
%A _Altug Alkan_, Jun 11 2018