Except for 2 and 5, all prime numbers end in the digit 1, 3, 7 or 9. In the 1800s, it was discovered that these possible last digits are equally frequent.