[go: up one dir, main page]

login
A123568
Prime numbers of the form (10^n - 7)/3.
2
31, 331, 3331, 33331, 333331, 3333331, 33333331, 333333333333333331, 3333333333333333333333333333333333333331, 33333333333333333333333333333333333333333333333331
OFFSET
1,1
COMMENTS
The number of initial 3s is n - 1.
Note that each n from 2 to 8 gives primes, but after that the n that correspond to primes are progressively further apart. Singh (1997) gives this as an example of why mathematicians don't trust a preponderance of evidence as proof: in the 17th century, when factoring numbers with as few as eight digits wasn't as easy as it is today, the pattern suggested that all numbers of this form are prime. - Alonso del Arte, Nov 11 2012
REFERENCES
Simon Singh, Fermat's Enigma. New York: Walker & Company (1997) p. 159.
LINKS
EXAMPLE
a(7) = 33333331 because that is the seventh number of the specified form to be prime.
333333331 is not in the sequence because it is composite, being the product of 17 and 19607843.
MATHEMATICA
Do[If[PrimeQ[(10^n - 7)/3], Print[(10^n - 7)/3]], {n, 1, 100}] (* Jasinski *)
Select[(10^Range[50] - 7)/3, PrimeQ[#] &] (* Alonso del Arte, Nov 11 2012 *)
Select[Table[FromDigits[PadLeft[{1}, n, 3]], {n, 50}], PrimeQ] (* Harvey P. Dale, Dec 05 2018 *)
PROG
(PARI) select(ispseudoprime, vector(20, n, (10^n-7)/3)) \\ Charles R Greathouse IV, Nov 12 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Nov 12 2006
STATUS
approved