Skip to main content
1 of 4
user avatar
user avatar

The answer is most probably "It is always the set of all prime numbers or empty". Indeed, assume that $S$ is not empty. First of all, $S$ must contain $2$ (if it contains $p>2$, then $p^2+1$ is even). Then it also contains $2\cdot 2+1=5, 2\cdot 5+1=11, 7\mid 5\cdot 11+1, 3\mid 2\cdot 7+1,$ etc. It looks like then $S$ contains all prime numbers. I cannot prove it yet, but the proof should not be that difficult.

user6976