Displaying 1-10 of 116 results found.
page
1
2
3
4
5
6
7
8
9
10
11
12
Indices of prime repunits: numbers k such that 11...111 (with k 1's) = (10^k - 1)/9 is prime.
(Formerly M2114)
+10
152
2, 19, 23, 317, 1031, 49081, 86453, 109297, 270343, 5794777, 8177207
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
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.
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.
LINKS
John Brillhart et al., Factorizations of b^n +- 1, Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 3rd edition, 2002.
Chris K. Caldwell, The Prime Pages, Top 20: Repunit (lists certified primes with n >= 1000)
Martianus Frederic Ezerman, Bertrand Meyer and Patrick Solé, On Polynomial Pairs of Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.3.5.
Bernard Schott, Les nombres brésiliens, Quadrature, no. 76, avril-juin 2010, pages 30-38; included here with permission from the editors of Quadrature.
Eric Weisstein's World of Mathematics, Repunit
EXAMPLE
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.
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 *)
PROG
(PARI) forprime(x=2, 20000, if(ispseudoprime((10^x-1)/9), print1(x", "))) \\ Cino Hilliard, Dec 23 2008
(Magma) [p: p in PrimesUpTo(500) | IsPrime((10^p - 1) div 9)]; // Vincenzo Librandi, Nov 06 2014
(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
Primes of the form 1 + n + n^2 + n^3 + ... + n^k, n > 1, k > 1.
+10
66
7, 13, 31, 43, 73, 127, 157, 211, 241, 307, 421, 463, 601, 757, 1093, 1123, 1483, 1723, 2551, 2801, 2971, 3307, 3541, 3907, 4423, 4831, 5113, 5701, 6007, 6163, 6481, 8011, 8191, 9901, 10303, 11131, 12211, 12433, 13807, 14281, 17293, 19183, 19531, 20023
COMMENTS
Also known as Brazilian primes. The primes that are not Brazilian primes are in A220627.
The number of terms k+1 is always an odd prime, but this is not enough to guarantee a prime, for example 111 = 1 + 10 + 100 = 3*37.
The inverses of the Brazilian primes form a convergent series; the sum is slightly larger than 0.33 (see Theorem 4 of Quadrature article in the Links). (End)
It is not known whether there are infinitely many Brazilian primes. See A002383. - Bernard Schott, Jan 11 2013
Primes of the form (n^p - 1)/(n - 1), where p is odd prime and n > 1. - Thomas Ordowski, Apr 25 2013
Number of terms less than 10^n: 1, 5, 14, 34, 83, 205, 542, 1445, 3880, 10831, 30699, 88285, ..., . - Robert G. Wilson v, Mar 31 2014
Brazilian primes fall into two classes:
1) when n is prime, we get sequence A023195 except 3 which is not Brazilian,
2) when n is composite, we get sequence A285017. (End)
The conjecture proposed in Quadrature "No Sophie Germain prime is Brazilian (prime)" (see link Bernard Schott, Quadrature, Conjecture 1, page 36) is false. Thanks to Giovanni Resta, who found that a(856) = 28792661 = 1 + 73 + 73^2 + 73^3 + 73^4 = (11111)_73 is the 141385th Sophie Germain prime. - Bernard Schott, Mar 08 2019
REFERENCES
Daniel Lignon, Dictionnaire de (presque) tous les nombres entiers, Ellipses, Paris, 2012, page 174.
LINKS
Bernard Schott, Les nombres brésiliens, Quadrature, no. 76, avril-juin 2010, pages 30-38; included here with permission from the editors of Quadrature.
EXAMPLE
13 is a term since it is prime and 13 = 1 + 3 + 3^2 = 111_3.
31 is a term since it is prime and 31 = 1 + 2 + 2^2 + 2^3 + 2^4 = 11111_2.
The sequence represented as a sparse matrix with the k-th column indexed by A006093(k+1), primes minus 1, and row n by A000027(n+1). Traversing the matrix by counterdiagonals produces a non-monotone ordering.
2 4 6 10 12 16
2 7 31 127 - 8191 131071
3 13 - 1093 - 797161 -
4 - - - - - -
5 31 - 19531 12207031 305175781 -
6 43 - 55987 - - -
7 - 2801 - - 16148168401 -
8 73 - - - - -
9 - - - - - -
10 - - - - - -
11 - - - - - 50544702849929377
12 157 22621 - - - -
13 - 30941 5229043 - - -
14 211 - 8108731 - - -
15 241 - - - - -
16 - - - - - -
17 307 88741 25646167 2141993519227 - -
18 - - - - - -
19 - - - - - -
20 421 - - 10778947368421 - 689852631578947368421
21 463 - - 17513875027111 - 1502097124754084594737
22 - 245411 - - - -
23 - 292561 - - - -
24 601 346201 - - - -
Except for the initial values in the respective sequences the rows and columns as labeled in the matrix are:
(End)
MATHEMATICA
max = 140; maxdata = (1 - max^3)/(1 - max); a = {}; Do[i = 1; While[i = i + 2; cc = (1 - m^i)/(1 - m); cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}]; Union[a] (* Lei Zhou, Feb 08 2012 *)
f[n_] := Block[{i = 1, d, p = Prime@ n}, d = Rest@ Divisors[p - 1]; While[ id = IntegerDigits[p, d[[i]]]; id != Reverse@ id || Union@ id != {1}, i++]; d[[i]]]; Select[ Range[2, 60], 1 + f@# != Prime@# &] (* Robert G. Wilson v, Mar 31 2014 *)
PROG
(PARI) list(lim)=my(v=List(), t, k); for(n=2, sqrt(lim), t=1+n; k=1; while((t+=n^k++)<=lim, if(isprime(t), listput(v, t)))); vecsort(Vec(v), , 8) \\ Charles R Greathouse IV, Jan 08 2013
(PARI) A085104_vec(N, L=List())=forprime(K=3, logint(N+1, 2), for(n=2, sqrtnint(N-1, K-1), isprime((n^K-1)\(n-1))&&listput(L, (n^K-1)\(n-1)))); Set(L) \\ M. F. Hasler, Jun 26 2018
(Haskell)
a085104 n = a085104_list !! (n-1)
a085104_list = filter ((> 1) . a088323) a000040_list
CROSSREFS
Cf. A003424 (n restricted to prime powers).
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 03 2003
Absolute primes (or permutable primes): every permutation of the digits is a prime.
(Formerly M0658)
+10
50
2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 199, 311, 337, 373, 733, 919, 991, 1111111111111111111, 11111111111111111111111
COMMENTS
From Bill Gosper, Jan 24 2003, in a posting to the Math Fun Mailing List: (Start)
Recall Sloane's old request for more terms of A003459 = (2 3 5 7 11 13 17 31 37 71 73 79 97 113 131 199 311 337 373 733 919 991 ...) and Richard C. Schroeppel's astonishing observation that the next term is 1111111111111111111. Absent Rich's analysis, trying to extend this sequence makes a great set of beginner's programming exercises. We may restrict the search to combinations of the four digits 1,3,7,9, only look at starting numbers with nondecreasing digits, generate only unique digit combinations, and only as needed. (We get the target sequence afterward by generating and merging the various permutations, and fudging the initial 2,3,5,7.)
To my amazement the (uncompiled, Macsyma) program printed 11,13,...,199,337, and after about a minute, 1111111111111111111!
And after a few more minutes, (10^23-1)/9! (End)
Boal and Bevis say that Johnson (1977) proves that if there is a term > 1000 with exactly two distinct digits then it must have more than nine billion digits. - N. J. A. Sloane, Jun 06 2015
Some authors require permutable or absolute primes to have at least two different digits. This produces the subsequence A129338. - M. F. Hasler, Mar 26 2008
See A039986 for a related problem with more sophisticated (PARI) code (iteration over only inequivalent digit permutations). - M. F. Hasler, Jul 10 2018
REFERENCES
Richard C. Schroeppel, personal communication.
Wacław Sierpiński, Co wiemy, a czego nie wiemy o liczbach pierwszych. Warsaw: PZWS, 1961, pp. 20-21.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
James Grime and Brady Haran, Absolute Primes, YouTube Numberphile video, 2024.
A. W. Johnson, Absolute primes, Mathematics Magazine, 1977, vol. 50, pp. 100-103.
MATHEMATICA
f[n_]:=Module[{b=Permutations[IntegerDigits[n]], q=1}, Do[If[!PrimeQ[c=FromDigits[b[[m]]]], q=0; Break[]], {m, Length[b]}]; q]; Select[Range[1000], f[#]>0&] (* Vladimir Joseph Stephan Orlovsky, Feb 03 2011 *)
PROG
(Haskell)
import Data.List (permutations)
a003459 n = a003459_list !! (n-1)
a003459_list = filter isAbsPrime a000040_list where
isAbsPrime = all (== 1) . map (a010051 . read) . permutations . show
(PARI) for(n=1, oo, my(S=[], r=10^n\9); for(a=1, 9^(n>1), for(b=if(n>2, 1-a), 9-a, for(j=0, if(b, n-1), ispseudoprime(a*r+b*10^j)||next(2)); S=concat(S, vector(if(b, n, 1), k, a*r+10^(k-1)*b)))); apply(t->printf(t", "), Set(S))) \\ M. F. Hasler, Jun 26 2018
CROSSREFS
A258706 gives minimal representatives of the permutation classes.
Undulating primes (digits alternate).
+10
38
2, 3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 18181, 32323, 35353, 72727, 74747, 78787, 94949, 95959, 1212121, 1616161, 323232323, 383838383
COMMENTS
Sometimes called "smoothly undulating primes", to distinguish them from A059168.
REFERENCES
C. A. Pickover, "Keys to Infinity", Wiley 1995, p. 159,160.
C. A. Pickover, "Wonders of Numbers", Oxford New York 2001, Chapter 52, pp. 123-124, 316-317.
LINKS
C. A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," Zentralblatt review
MATHEMATICA
a[n_] := DeleteDuplicates[Take[IntegerDigits[n], {1, -1, 2}]]; b[n_] := DeleteDuplicates[Take[IntegerDigits[n], {2, -1, 2}]]; t={}; Do[p=Prime[n]; If[p<10, AppendTo[t, p], If[Length[a[p]] == Length[b[p]] == 1 && a[p][[1]] != b[p][[1]], AppendTo[t, p]]], {n, 3*10^7}]; t (* Jayanta Basu, May 04 2013 *)
PROG
(Python)
from itertools import count, islice
from sympy import isprime, primerange
def agen(): # generator of terms
yield from (p for p in primerange(2, 100) if p != 11)
yield from (t for t in (int((A+B)*d2+A) for d2 in count(1) for A in "1379" for B in "0123456789" if A != B) if isprime(t))
1 repeated prime(n) times.
+10
22
11, 111, 11111, 1111111, 11111111111, 1111111111111, 11111111111111111, 1111111111111111111, 11111111111111111111111, 11111111111111111111111111111, 1111111111111111111111111111111, 1111111111111111111111111111111111111
COMMENTS
Salomaa's first example of an infinite language. - N. J. A. Sloane, Dec 05 2012
If p is a prime and gcd(p,b-1)=1, then (b^p-1)/(b-1) == 1 (mod p); by Fermat's little theorem. For example 1111111 == 1 (mod 7). - Thomas Ordowski, Apr 09 2016
REFERENCES
A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 2. - From N. J. A. Sloane, Dec 05 2012
MAPLE
f:=n->(10^ithprime(n)-1)/9; [seq(f(n), n=1..20)]; # N. J. A. Sloane, Dec 05 2012
MATHEMATICA
Table[FromDigits[PadRight[{}, Prime[n], 1]], {n, 15}] (* Harvey P. Dale, Apr 10 2012 *)
AUTHOR
J. Castillo (arp(AT)cia-g.com) [Broken email address?]
Smallest prime beginning with exactly n 1's.
+10
17
2, 13, 11, 1117, 11113, 111119, 11111101, 11111117, 111111113, 11111111129, 11111111113, 1111111111139, 11111111111123, 1111111111111013, 1111111111111123, 11111111111111101, 11111111111111119
COMMENTS
Largest terms are only probable primes. Some terms of the sequence are also in A004022 (repunit primes) or A056710 (all digits same except last digit). All terms of A004022 are in the current sequence.
According to the Magma Calculator (at http://magma.maths.usyd.edu.au/calc/), all 201 terms in the table (and thus all 17 terms listed above) are, in fact, prime. - Jon E. Schoenfield, Aug 24 2009
Primes with digital product = 3.
+10
17
3, 13, 31, 113, 131, 311, 11113, 11131, 11311, 113111, 131111, 311111, 11111131, 11111311, 11113111, 11131111, 111111113, 111111131, 111113111, 131111111, 11111111113, 11111111131, 11113111111, 11131111111, 31111111111
MATHEMATICA
Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{3, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 12}]]
PROG
(Python)
from sympy import isprime
def agen():
digits = 0
while True:
for i in range(digits+1):
t = int("1"*(digits-i) + "3" + "1"*i)
if isprime(t): yield t
digits += 1
g = agen()
CROSSREFS
Cf. A004022, A107612, A107690, A107691, A107692, A107693, A107694, A107695, A107696, A107697, A107698.
Bogotá numbers: numbers k such that k = m*p(m) where p(m) is the digital product of m.
+10
17
0, 1, 4, 9, 11, 16, 24, 25, 36, 39, 42, 49, 56, 64, 75, 81, 88, 93, 96, 111, 119, 138, 144, 164, 171, 192, 224, 242, 250, 255, 297, 312, 336, 339, 366, 378, 393, 408, 422, 448, 456, 488, 497, 516, 520, 522, 525, 564, 575, 648, 696, 704, 738, 744, 755, 777, 792
COMMENTS
Named Bogotá numbers by Tomás Uribe and Juan Pablo Fernández based on similarity of the construction to the Colombian numbers ( A003052).
Some questions about these numbers:
(i) Some Bogotá numbers occur in pairs (such as 24 and 25). Are there infinitely many such pairs?
(ii) More generally, can arbitrarily long sets of consecutive numbers be found all of which are Bogotá numbers?
(iii) Can the gap between two consecutive Bogotá numbers be arbitrarily large? Answer: Yes.
The only primes in this sequence are A004022.
To see if a number is a Bogotá number, we only have to look at its 7-smooth divisors. Proof: If a number k is a Bogotá number then k = m*p(m) where p(m) is 7-smooth as it's a product of digits. Furthermore, if k = m*p(m) then p(m) | k. Q.e.d. Below is an example using this idea.
To find Bogotá numbers k up to N we can make a list of 7-smooth numbers up to sqrt(N) and list the factorizations into single-digit numbers of each of these 7-smooth numbers that when concatenated give m such that m * p(m) = k where p(m) is that 7-smooth number.
For example, 10 is a 7-smooth number. Its factorizations into single-digit numbers are 2*5, 5*2, 1*2*5 and so on. This tells us that 10*25 = 250, 10*52 = 520, 10*125 = 1250 all are Bogotá numbers.
Similarily we can find odd Bogotá numbers to then find consecutive Bogotá numbers (See A336864). (End)
EXAMPLE
520 is a term because 52 * p(52) = 52 * 10 = 520.
Example using we only have to look at 7-smooth divisors:
520 is a term as its 7-smooth divisors d are 1, 2, 4, 5, 8, 10, 20, 40. values 520/d are 520, 260, 130, 104, 65, 52, 26, 13 of which 52 * (5*2) = 520 where (5*2) are the products of 52. (End)
PROG
(PARI) f(n) = vecprod(digits(n))*n; \\ A098736
isok(n) = my(k=0); for (k=0, n, if (f(k) == n, return(1))); \\ Michel Marcus, Aug 06 2020
(PARI) is(n) = { my(f = factor(n), s7 = 1, d, sl = sqrtint(n)); for(i = 1, #f~, if(f[i, 1] > 7, break ); s7 *= f[i, 1]^f[i, 2]; ); d = divisors(s7); for(i = 1, #d, if(d[i] > sl, return(0)); if(n/d[i] * vecprod(digits(n/d[i])) == n, return(1); ) ); 0 } \\ David A. Corneth, Aug 06 2020
101, 113, 131, 151, 181, 191, 211, 311, 811, 911, 1117, 1151, 1171, 1181, 1511, 1811, 2111, 4111, 8111, 10111, 11113, 11117, 11119, 11131, 11161, 11171, 11311, 11411, 16111, 101111, 111119, 111121, 111191, 111211, 111611, 112111, 113111, 131111, 311111, 511111
COMMENTS
According to the prime glossary "a near-repunit prime is a prime all but one of whose digits are 1." This would also include {2, 3, 5, 7, 13, 17, 19, 31, 41, 61 and 71}, but this sequence only lists terms with more than two digits. - M. F. Hasler, Feb 10 2020
REFERENCES
C. Caldwell and H. Dubner, "The near repunit primes 1(n-k-1)01(1k)," J. Recreational Math., 27 (1995) 35-41.
Heleen, J. P., "More near-repunit primes 1(n-k-1)D(1)1(k), D=2,3, ..., 9," J. Recreational Math., 29:3 (1998) 190-195.
EXAMPLE
a(2)=113 is a term because 113 is a prime and all digits are 1 except one.
MATHEMATICA
lst = {}; Do[r = (10^n - 1)/9; Do[AppendTo[lst, DeleteCases[Select[FromDigits[Permutations[Append[IntegerDigits[r], d]]], PrimeQ], r]], {d, 0, 9}], {n, 2, 14}]; Sort[Flatten[lst]] (* Arkadiusz Wesolowski, Sep 20 2011 *)
Primes with digital product = 2.
+10
16
2, 211, 2111, 111121, 111211, 112111, 1111211, 1111111121, 1111211111, 1121111111, 111111211111, 111211111111, 2111111111111, 111111111111112111, 111111112111111111, 111111211111111111, 112111111111111111
MAPLE
for i from 0 to 30 do it:=sum(10^j, j=0..i): for k from 0 to i do if isprime(it+10^k) then printf(`%d, `, it+10^k) fi: od:od: (Sellers)
MATHEMATICA
Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{2, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 19}]] (* Robert G. Wilson v, May 19 2005 *)
Select[Flatten[Table[FromDigits/@Permutations[PadRight[{2}, n, 1]], {n, 20}]], PrimeQ]//Sort (* Harvey P. Dale, May 28 2017 *)
CROSSREFS
Cf. A004022, A107689, A107690, A107691, A107692, A107693, A107694, A107695, A107696, A107697, A107698.
Search completed in 0.051 seconds
|