login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316942 a(n) = n - a(pi(n)) - a(n-pi(n)) with a(1) = a(2) = 1, where pi = A000720. 0
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, 14, 15, 16, 16, 17, 17, 18, 19, 19, 20, 21, 22, 23, 23, 23, 23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 26, 26, 27, 27, 28, 28, 29, 30, 30, 31, 32, 32, 32, 33, 34, 35, 35, 35, 36, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
This sequence hits every positive integer.
LINKS
FORMULA
a(n) = n - a(A000720(n)) - a(A062298(n)) with a(1) = a(2) = 1.
a(n+1) - a(n) = 0 or 1 for all n >= 1.
Conjecture : lim_{n->infinity} a(n)/n = 1/2.
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
Sequence in context: A029132 A195852 A122815 * A029127 A195851 A369149
KEYWORD
nonn
AUTHOR
Altug Alkan, Jul 17 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)