Are all $30n + 7$ numbers prime numbers where $n$ is a whole number? So I was lying on my bed and I began to wonder about prime numbers and as I went through each prime number I found that numbers $37, 67, 97, 127, 157, \ldots$ all happen to be prime numbers (correct me if I am wrong). Is there a way to mathematically prove this? 
 A: No. Choose $n=7$ for example, and the number is divisible by $7$.
A: If $7|n$ then $30(7k) + 7 = 7(30k + 1)$ so,.... no.
But also.  If $p$ is relatively prime to $7,2,3,5$ then there an $k$ so that $30*k\equiv 1 \mod p$. And so if $n\equiv -7k\mod p$ then $30n + 7 \equiv 0 \mod p$ and so $p|30n + 7$.
Example.  if $p = 13$ then $30\equiv 4\mod 13$ and $4*10\equiv 40 \equiv 1 \mod 13$.  
$-7\equiv 6\mod 13$ so if $n\equiv 10*6 = 60\equiv 8\mod 13$ then $30*8 + 7 = 247 = 13*19$.
A: So you stopped right short of the first counterexample: $30 \times 6 + 7 = 187 = 11 \times 17$. On Wolfram Alpha (if you don't have Wolfram Mathematica) type Select[Range[100], Not[PrimeQ[30# + 7]] &] and press Enter for more examples of $n$.
Obviously $30n + 7$ will be composite if $n$ is itself a multiple of 7, like the faster answerers already said. So for example $30 \times 7 + 7 = 217 = 7 \times 31$.
And for what it's worth, negative $n$ will also give you composite numbers, like for example $-5 \times 30 + 7 = -143 = -1 \times 11 \times 13$.
A: We can actually be quite precise about how often a number of the form $30n+7$ is prime, thanks to the Prime Number Theorem for Arithmetic Progressions.  In this case it shows that for large values of $x$, the number of positive integers $n \le x$ such that $30n+7$ is prime is approximately (asymptotically equal to)
$$\frac{15}{4} \frac{x}{\log x}.$$
Since that quantity goes to $\infty$ as $x\to\infty$, there are indeed infinitely many prime values of $30n+7$ (a fact that also follows from the slightly weaker Dirichlet’s theorem).  But since that same quantity is eventually smaller than $x$, $30n+7$ is not always — nor is it even usually — prime.  The fact that the approximate count doesn’t drop below $x$ until $x>42$ or so is a partial explanation for why the frequency of primes is so high for the first few values of $n$ that you believed the pattern might continue.
