# Prime numbers

So it was my observation that all the prime numbers I saw ended with digits 1,3,7,9.Is this true for all primes? Is it proved?

## Answers and Replies

With an exception to 5

Char. Limit
Gold Member
Consider: With the exception of 2, no primes can be even, as if they are even, then they are divisible by 2.

Therefore, all primes must end in 1, 3, 5, 7, or 9.

Consider: With the exception of 5, no primes can end in 5, as if they do so, then they are a multiple of 5.

Therefore, all primes must end in 1, 3, 7, or 9.

So... yes.

If you need a proof of either of the considered statements, I'm sure it wouldn't be too difficult.

bah, beat me to it. :)

Yeah that was pretty simple :) thanks anyways

Char. Limit
Gold Member
Simple, maybe, but it's still helpful for prime identification. Considering that just those two little rules invalidate over 60% of all natural numbers from being prime, it allows you (or a computer) to focus more easily upon the other 40%.

You might find this interesting. This is more numerical-search than proofy stuff:http://korn19.ch/coding/primes/ending.php
Interesting. This means to me that there are about as many primes that end in 3, as there are primes that end in 1 (or 7 or 9). I wonder if this has been proven.