login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A073798 pi(n) is a power of 2, where pi(n) = A000720(n) is the number of primes <= n. 5
2, 3, 4, 7, 8, 9, 10, 19, 20, 21, 22, 53, 54, 55, 56, 57, 58, 131, 132, 133, 134, 135, 136, 311, 312, 719, 720, 721, 722, 723, 724, 725, 726, 1619, 1620, 3671, 3672, 8161, 8162, 8163, 8164, 8165, 8166, 17863, 17864, 17865, 17866, 17867, 17868, 17869, 17870 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The numbers occur in blocks of consecutive integers: 2, 3-4, 7-10, 19-22, ...; the n-th block starts at the 2^n-th prime (A033844) and ends just before the (2^n + 1)-th prime (A051439).

LINKS

Ivan Neretin, Table of n, a(n) for n = 1..665

EXAMPLE

10 is in the sequence since pi(10)=4=2^2.

MATHEMATICA

pow2[n_] := n==1||(n>1&&IntegerQ[n/2]&&pow2[n/2]); Select[Range[20000], pow2[PrimePi[ # ]]&]

Flatten@Table[Range[p = Prime[2^k], NextPrime[p] - 1], {k, 0, 11}] (* Ivan Neretin, Jan 21 2017 *)

PROG

(PARI) isok(n) = my(pi = primepi(n)); (pi==1) || (pi==2) || (ispower(primepi(n), , &k) && (k==2)); \\ Michel Marcus, Jan 23 2017

CROSSREFS

Cf. A000079, A000720, A015910, A073797, A073799.

Sequence in context: A112965 A152979 A070942 * A124375 A287664 A037080

Adjacent sequences:  A073795 A073796 A073797 * A073799 A073800 A073801

KEYWORD

nonn

AUTHOR

Labos Elemer, Aug 14 2002

EXTENSIONS

Edited by Dean Hickerson, Aug 15 2002

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 16 01:32 EST 2019. Contains 330013 sequences. (Running on oeis4.)