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.

A004023 Indices of prime repunits: numbers k such that 11...111 (with k 1's) = (10^k - 1)/9 is prime.

Original entry on oeis.org

2, 19, 23, 317, 1031, 49081, 86453, 109297, 270343, 5794777, 8177207
Offset: 1

Views

Author

Keywords

Comments

People who search for repunit primes or repdigit primes may be looking for this entry.
The indices of primes with digital product (i.e., product of digits) equal to 1.
As of August 2014, only the first five repunits, through (10^1031-1)/9, have been proved prime. The next four repunits are known only to be probable primes and have not been proved to be prime. - Robert Baillie, Aug 17 2014
These indices p must also be prime. If p is not prime, say p = m*n, then 10^(m*n) - 1 = ((10^m)^n) - 1 => 10^m - 1 divides 10^(m*n) - 1. Since 9 divides 10^m - 1 or (10^m - 1)/9 = q, it follows q divides (10^p - 1)/9. This is a result of the identity, a^n - b^n = (a - b)(a^(n-1) + a^(n-2)*b + ... + b^(n-1)). - Cino Hilliard, Dec 23 2008
The numbers R_n = 11...111 = (10^n - 1)/9 with n in this sequence A004023, except for n = 2, are prime repunits in base ten, so they are prime Brazilian numbers belonging to A085104. [See Links: Les nombres brésiliens.] - Bernard Schott, Dec 24 2012
Search limit is 10800000, currently. - Serge Batalov, Jul 01 2021
On March 22 2022 the probable prime R49081 was proved to be a prime, and on May 15 2023 the probable prime R86453 was proved to be a prime. - Bassam Abdul-Baki, Dec 17 2024

Examples

			2 appears because the 2-digit repunit 11 is prime.
3 does not appear because 111 = 3 * 37 is not prime.
19 appears because the 19-digit repunit 1111111111111111111 is prime.
		

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 19, pp 6, Ellipses, Paris 2008.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A3.
  • Graham, Knuth and Patashnik, Concrete Mathematics, Addison-Wesley, 1994; see p 146 problem 22.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 235.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 142857 at pp. 197-198.

Crossrefs

See A004022 for the actual primes.

Programs

  • Magma
    [p: p in PrimesUpTo(500) | IsPrime((10^p - 1) div 9)]; // Vincenzo Librandi, Nov 06 2014
    
  • Mathematica
    Select[Range[271000], PrimeQ[FromDigits[PadRight[{}, #, 1]]] &] (* Harvey P. Dale, Nov 05 2011 *)
    repUnsUpTo[k_] := ParallelMap[If[PrimeQ[#] && PrimeQ[(10^# - 1)/9], #, Nothing] &, Range[k]]; repUnsUpTo[5000] (* Mikk Heidemaa, Apr 24 2017 *)
  • PARI
    forprime(x=2,20000,if(ispseudoprime((10^x-1)/9),print1(x","))) \\ Cino Hilliard, Dec 23 2008
    
  • Python
    from sympy import isprime; {print(n, end = ', ') for n in range(1, 10**7) if isprime(n) and isprime(10**n//9)} # (Note that sympy.isprime is only a pseudo-primality test.) - Ya-Ping Lu, Dec 20 2021, edited by M. F. Hasler, Mar 28 2022

Extensions

a(6) = 49081 PRP found by Harvey Dubner - posting to Number Theory List (NMBRTHRY(AT)LISTSERV.NODAK.EDU) Sep 09, 1999; proved prime by Paul Underwood, Mar 21 2022.
a(7) = 86453 found using pfgw (a faster version of PrimeForm) on Oct 26 2000 by Lew Baxter (posting to Number Theory List), Oct 26, 2000; proved prime by Andreas Enge, May 16 2023.
a(8) = 109297 was apparently discovered independently by (in alphabetical order) Paul Bourdelais and Harvey Dubner around Mar 26-28 2007.
a(9) = 270343, was found Jul 11 2007 by Maksym Voznyy and Anton Budnyy, subsequently confirmed as a(9) (see Repunit Primes Project link) by Robert Price, Dec 14 2010
a(10) = 5794777 was found Apr 20 2021 by Ryan Propper and Serge Batalov
a(11) = 8177207 was found May 08 2021 by Ryan Propper and Serge Batalov