I was wondering about number pairs, that differ by 2 on the natural numbers field. They can be twin primes, twin composites, and mixed. The mixed can be 2 types, either the first is prime, the second is composite, or the first is composite, the second is prime. I am specially interested in $\pi(n-2, n)$ , where $(n – 2)$ is prime and $n$ is composite. Are there some upper limits in terms of the number of primes, or can we say something about them that has some connection with $\pi(n)$ ?

  • 1
    $\begingroup$ Your $n$ is doing double duty. There are no $n$'s less than $n$. Second, if $p$ is any odd prime, then $p+2$ is composite almost all the time. So the number of pairs you're looking for is $\pi(n).$ $\endgroup$
    – B. Goddard
    Jul 22, 2019 at 10:40
  • $\begingroup$ So you say that $\pi(n-2, n)$ < $\pi(n)$, and the difference is the number of twin prime pairs up to n. $\endgroup$
    – Tilsight
    Jul 22, 2019 at 11:53

1 Answer 1


all primes greater than 5 are 1,7,11,13,17,19,23, or 29 mod 30. Your $n-2$ prime $n$ composite cases are could be any of them mod 30 which means they have a maximum of ${4x\over 15}$ cases up to x, assuming all cases are possible at once ( they aren't) this is also a very weak upper bound for the number of primes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.