cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A123568 Prime numbers of the form (10^n - 7)/3.

Original entry on oeis.org

31, 331, 3331, 33331, 333331, 3333331, 33333331, 333333333333333331, 3333333333333333333333333333333333333331, 33333333333333333333333333333333333333333333333331
Offset: 1

Views

Author

Artur Jasinski, Nov 12 2006

Keywords

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

Examples

			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.
		

References

  • Simon Singh, Fermat's Enigma. New York: Walker & Company (1997) p. 159.

Crossrefs

Programs

  • 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 *)
  • PARI
    select(ispseudoprime, vector(20, n, (10^n-7)/3)) \\ Charles R Greathouse IV, Nov 12 2012