What are some easy-to-remember prime numbers?

3.1k Views Asked by At

This is a question without much mathematical value, but since I don't immediately see an answer on Google I thought I'd ask anyway ... I'm looking for some largeish (> 10,000) easy-to-remember primes, like palindromes (313), numbers with decreasing digits 54321 (not a prime), etc. The primary purpose is for computer programs, where they are useful for hashing and the like.

What's your favorite, if you know any?

3

There are 3 best solutions below

0
On BEST ANSWER

Wikipedia's list of prime numbers includes "palindromic primes"

2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 10301, 10501, 10601, 11311, 11411, 12421, 12721, 12821, 13331, 13831, 13931, 14341, 14741

and "palindromic wing primes"

101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 11311, 11411, 33533, 77377, 77477, 77977, 1114111, 1117111, 3331333, 3337333, 7772777, 7774777, 7778777, 111181111, 111191111, 777767777, 77777677777, 99999199999.

0
On

Mersenne primes are pretty easy to remember... e.g. just remembering that 7 generates a double Mersenne gives you the 38-digit prime $2^{2^7-1}-1$. For smaller (but still "largeish") examples, $2^{17}-1$ and $2^{19}-1$ give 6-digit primes.

1
On

$$n^2 + n + 41$$

You can even change it to:

$$n^2 - n + 41$$

This gives primes for $n = 1$ to $n = 40$ (the first one has one less prime over the range for $n=40$).

There are variations that give 80 primes, but that formula has a 41 for 40 in a row, so easy to recall.

See many others at: http://mathworld.wolfram.com/Prime-GeneratingPolynomial.html