more useful options | |
PerlMonks |
Re: Rotationally Prime Numbers Revisitedby dHarry (Abbot) |
on Aug 07, 2008 at 08:41 UTC ( [id://702827]=note: print w/replies, xml ) | Need Help?? |
This is a fairly old threat but being a number geek myself I would like to add something anyway. First of all I use the term "Circular Primes" instead of "Rotationally Primes" because that seems to be the official name in literature. There might be an additional "trick" to filter out numbers that cannot be circular prime instead of doing some prime test on each cyclic permutation (worst case). I recently read paper on absolute primes (sometimes also called permutable primes) by A. Slinko. The rules for absolute primes are even more restrictive, i.e. every possible permutation (instead of only every cyclic permutation) should also result in a prime number. In this paper a survey is given of all known facts referring to absolute primes different from repunits. Some facts A second theorem is less trivial: Then this could be implemented for cyclic primes as well, i.e. short-circuit if some pattern of digits 1,3,7 and 9 occurs in the number. Now to get back to your original question: If you really want to find the next one your program needs modifications:
With a little bad luck R19 is the first candidate. The first really interesting candidate is R49081. For this giant number it is still unknown if it is prime or not. Although the real challenge would be to find a circular prime that’s not a repunit. Sorry for the long post
In Section
Seekers of Perl Wisdom
|
|