Find the smallest $n$ such that the $n$-th prime $p_n \equiv 330 \mod n $.

divisibilityelementary-number-theorynumber theoryprime numbersrecreational-mathematics

Find the smallest $n > 1$ such that the $n$-th prime $p_n \equiv 330 \mod n $.

I was investigating the remainders when the $n$-th prime is divided by $n$. For every positive integer $a < 330$, I have found a prime $p_n$ such that $p_n \equiv a\mod n $. However for $a = 330$, I have not found a solution so far for $n \le 4.5 \times 10^8$. There is no reason to believe why a solution should not exist specifically for 330 so I guess there is a solution which is really large.

Best Answer

This answer doesn't give a solution but an explanation for why they're rare.

Since $p_n \approx n \ln n$, the remainders $p_n \bmod n$ roughly follow a saw-tooth. Between $e^a$ and $e^{a+1}$ there's only a small range where the modulus is approximately the right value, and even moduli are at a disadvantage because they can only occur when $n$ is odd and $\lfloor \frac{p_n} {n} \rfloor$ is odd. Moreover, the remainder has to be large enough, so the first few teeth are irrelevant.

Combining all these factors, up to $4.5\times 10^8$ there have only been about 20 candidates, so heuristically it's not unexpected that none of them should be successful.

Related Question