Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Jul 20 2018 11:02:18
%S 1,1,1,2,3,4,4,4,4,4,4,5,5,6,7,8,9,10,11,11,12,12,13,13,13,13,13,13,
%T 14,15,16,16,17,17,18,19,19,20,21,22,23,23,23,23,23,24,24,24,25,25,25,
%U 26,26,26,26,26,26,27,27,28,28,29,30,30,31,32,32,32,33,34,35,35,35,36,37
%N a(n) = n - a(pi(n)) - a(n-pi(n)) with a(1) = a(2) = 1, where pi = A000720.
%C This sequence hits every positive integer.
%F a(n) = n - a(A000720(n)) - a(A062298(n)) with a(1) = a(2) = 1.
%F a(n+1) - a(n) = 0 or 1 for all n >= 1.
%F Conjecture : lim_{n->infinity} a(n)/n = 1/2.
%t Nest[Append[#2, #1 - #2[[PrimePi[#1] ]] - #2[[#1 - PrimePi[#1] ]] ] & @@ {Length@ # + 1, #} &, {1, 1}, 73] (* _Michael De Vlieger_, Jul 20 2018 *)
%o (PARI) q=vector(75); for(n=1, 2, q[n] = 1); for(n=3, #q, q[n] = n - q[primepi(n)] - q[n-primepi(n)]); q
%Y Cf. A000720, A062298, A316434.
%K nonn
%O 1,4
%A _Altug Alkan_, Jul 17 2018