This site is supported by donations to The OEIS Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A271383 Smallest k such that there are exactly n primes between k*(k-1) and k^2 and exactly n primes between k^2 and k*(k+1). 0
 2, 8, 13, 21, 32, 38, 46, 60, 85, 74, 102, 111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Does k exist for every n? LINKS Wikipedia, Oppermann's conjecture. EXAMPLE For n = 6: 38*(38-1) = 1406, 38^2 = 1444 and 38*(38+1) = 1482. A000720(1444) - A000720(1406) = 6 and A000720(1482) - A000720(1444) = 6. Since 38 is the smallest k where the number of primes in both intervals is 6, a(6) = 38. MATHEMATICA Table[SelectFirst[Range[10^3], And[PrimePi[#^2] - PrimePi[# (# - 1)] == n, PrimePi[# (# + 1)] - PrimePi[#^2] == n] &], {n, 30}] /. k_ /; MissingQ@ k -> 0 (* Michael De Vlieger, Apr 09 2016, Version 10.2 *) PROG (PARI) a(n) = my(k=1); while((primepi(k^2)-primepi(k*(k-1)))!=n || (primepi(k*(k+1))-primepi(k^2))!=n, k++); k CROSSREFS Sequence in context: A247783 A096274 A305879 * A193666 A196024 A037382 Adjacent sequences:  A271380 A271381 A271382 * A271384 A271385 A271386 KEYWORD nonn,more AUTHOR Felix FrÃ¶hlich, Apr 07 2016 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.

Last modified January 19 20:01 EST 2019. Contains 319309 sequences. (Running on oeis4.)