OFFSET
1,4
COMMENTS
This sequence hits every positive integer.
FORMULA
MATHEMATICA
Nest[Append[#2, #1 - #2[[PrimePi[#1] ]] - #2[[#1 - PrimePi[#1] ]] ] & @@ {Length@ # + 1, #} &, {1, 1}, 73] (* Michael De Vlieger, Jul 20 2018 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jul 17 2018
STATUS
approved