OFFSET
1,1
COMMENTS
There are almost certainly no more terms. Can anyone prove this conclusively?
The analogous sequence where the number of primes between 0 and n equals the number of primes from n to 2n is finite, consisting of only 2, 4, and 10. See Ehrhart. - Charles R Greathouse IV, Jul 02 2013
LINKS
Eugene Ehrhart, On prime numbers, Fibonacci Quarterly 26:3 (1988), pp. 271-274.
FORMULA
Numbers n such that pi(3n) + pi(n-1) = 2pi(2n).
EXAMPLE
4 is not in the sequence since the interval [n,2n] = [4,8] contains two primes (5 and 7), while the interval [2n,3n] = [8,12] contains only one prime (11).
6 is in the sequence since the intervals [6,12] contains two primes (7 and 11), and the interval [12,18] also contains two primes (13 and 17).
MATHEMATICA
Do[If[PrimePi[3n]+PrimePi[n-1]==2*PrimePi[2n], Print[n]], {n, 4, 10^6}]
PROG
(PARI) is(n)=my(t=primepi(3*n)+primepi(n-1)); t%2==0 && t==2*primepi(2*n) \\ Charles R Greathouse IV, Jul 02 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 30 2013
STATUS
approved