Can every prime (greater than $5$) be expressed in the form $30m+n$?

Yes, prime $\,p>5\,\Rightarrow\,p\,$ is coprime to $\,2,3,5\,$ so $\,p\,$ is coprime to $\,2\cdot 3\cdot 5 = 30,\,$ thus so too is its remainder $\ n = (p\bmod 30),\,$ hence $\,n\,$ lies in one of the $\,\phi(3) = 8\,$ residue classes that you listed.

Remark $\ 30$ is the largest integer with this property, i.e. every positive integer $> 30$ has at least one composite totative. A proof is in this answer.


Suppose $T$ was the set of all numbers from 0 to 29. Every prime number can be expressed as $30m + n:n \in T$. In fact, every integer can be expressed this way. However, there are certain values of $n$ for which you'll never get a prime. For example, $30m + 15$ will never be prime, since this number will be divisible by 3 and 5. Hence we can safely omit 15 from $T$.

This is true for all numbers except for those in the $T$ you gave. All of these (except 1) share no factors with 30, that is, they are coprime with 30. The conclusion is that yes, your proposition is true.


Suppose that a counterexample does exist. This $n \not\in T$, $0 < n < 30$. If $n = 2$, then $30m + n$ is not prime because it is even. If $n = 3$, then $30m + n$ is not prime because this number is divisible by $3$, which you can verify thus: $$\frac{30m + 3}{3} = 10m + 1.$$ In this way, we can rule out the even possibilities for $n$, as well as the multiples of $3$ and $5$. This leaves us $1, 7, 11, 13, 17, 19, 23, 29$, which you've already discovered.