login
Search: a004022 -id:a004022
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
OFFSET
1,1
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
Paul Bourdelais, A Generalized Repunit Conjecture, NMBRTHRY, 25 Jun 2009.
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)
Patrick De Geest, Circular Primes
Giovanni Di Maria, Repunit Primes Project
Harvey Dubner, Generalized repunit primes, Math. Comp., 61 (1993), 927-930. [Annotated scanned copy]
Harvey Dubner, New probable prime repunit, R(49081), Number Theory List, Sep 09 1999.
Harvey Dubner, Repunit R49081 is a probable prime, Math. Comp., 71 (2001), 833-835.
Martianus Frederic Ezerman, Bertrand Meyer, and Patrick Solé, On Polynomial Pairs of Integers, arXiv:1210.7593 [math.NT], 2012-2014.
Martianus Frederic Ezerman, Bertrand Meyer and Patrick Solé, On Polynomial Pairs of Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.3.5.
Dmytro S. Inosov and Emil Vlasák, Cryptarithmically unique terms in integer sequences, arXiv:2410.21427 [math.NT], 2024. See p. 18.
T. Muller, Ist die Folge der Primzahl-quersummen beschrankt?, Elem. Math. 66 (2011) 146-154; doi:10.4171/EM/183.
Bernard Schott, Les nombres brésiliens, Quadrature, no. 76, avril-juin 2010, pages 30-38; included here with permission from the editors of Quadrature.
Sam Wagstaff, Jr., The Cunningham Project
E. Wegrzynowski, Nombres 1_[n] premiers
Eric Weisstein's World of Mathematics, Integer Sequence Primes
Eric Weisstein's World of Mathematics, Repunit
Eric Weisstein's World of Mathematics, Repunit Prime
H. C. Williams and Harvey Dubner, The primality of R1031, Math. Comp., 47(176), Oct 1986, 703-711.
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
CROSSREFS
See A004022 for the actual primes.
KEYWORD
hard,nonn,nice,more
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
STATUS
approved
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
OFFSET
1,1
COMMENTS
Primes that are base-b repunits with three or more digits for at least one b >= 2: Primes in A053696. Subsequence of A000668 U A076481 U A086122 U A165210 U A102170 U A004022 U ... (for each possible b). - Rick L. Shepherd, Sep 07 2009
From Bernard Schott, Dec 18 2012: (Start)
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
From Bernard Schott, Apr 08 2017: (Start)
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
Jon E. Schoenfield, Table of n, a(n) for n = 1..10831 (terms up to 10^10; terms 1..3880 from T. D. Noe)
Bernard Schott, Les nombres brésiliens, Quadrature, no. 76, avril-juin 2010, pages 30-38; included here with permission from the editors of Quadrature.
FORMULA
A010051(a(n)) * A088323(a(n)) > 1. - Reinhard Zumkeller, Jan 22 2014
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.
From Hartmut F. W. Hoft, May 08 2017: (Start)
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:
column 2: A002383 row 2: A000668
column 4: A088548 row 3: A076481
column 6: A088550 row 4: -
column 10: A162861 row 5: A086122.
(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
-- Reinhard Zumkeller, Jan 22 2014
CROSSREFS
Cf. A189891 (complement), A125134 (Brazilian numbers), A220627 (Primes that are non-Brazilian).
Cf. A003424 (n restricted to prime powers).
Equals A023195 \3 Union A285017 with empty intersection.
Primes of the form (b^k-1)/(b-1) for b=2: A000668, b=3: A076481, b=5: A086122, b=6: A165210, b=7: A102170, b=10: A004022.
Primes of the form (b^k-1)/(b-1) for k=3: A002383, k=5: A088548, k=7: A088550, k=11: A162861.
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 03 2003
EXTENSIONS
More terms from David Wasserman, Jan 26 2005
STATUS
approved
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
OFFSET
1,1
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
I. O. Angell and H. J. Godwin, On Truncatable Primes, Math. Comput. 31, 265-267, 1977. [Related paper, but primarily concerned with A023107 and A103443. - N. J. A. Sloane, Jun 06 2015]
T. N. Bhargava and P. H. Doyle, On the existence of absolute primes, Math. Mag., 47 (1974), 233.
J. L. Boal and J. H. Bevis, Permutable primes. Math. Mag., 55 (No. 1, 1982), 38-41.
J. P. Delahaye, Persistent Primes, Illustrating Permutable, Circular, Right & Left Truncatable Primes, Pour La Science no 256.
James Grime and Brady Haran, Absolute Primes, YouTube Numberphile video, 2024.
A. W. Johnson, Absolute primes, Mathematics Magazine, 1977, vol. 50, pp. 100-103.
A. Slinko, Absolute Primes Oct. 2000.
A. Slinko, Absolute Primes, Oct. 2000 [Cached copy, permission requested].
Wikipedia, Permutable prime.
FORMULA
Conjecture: for n >= 23, a(n) = A004022(n-21). - Max Alekseyev, Oct 08 2018
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 *)
(* Linear complexity: can't reach R(19). See A258706. - Bill Gosper, Jan 06 2017 *)
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
-- Reinhard Zumkeller, Sep 15 2011
(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
Includes all of A004022 = A002275(A004023).
A258706 gives minimal representatives of the permutation classes.
Cf. A039986.
KEYWORD
nonn,base,nice,hard
EXTENSIONS
The next terms are a(25)=A002275(317), a(26)=A002275(1031), a(27)=A002275(49081).
STATUS
approved
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
OFFSET
1,1
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
Michael S. Branicky, Table of n, a(n) for n = 1..131 (terms 1..100 from Sean A. Irvine)
C. A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," Zentralblatt review
Charles W. Trigg, Nine-digit patterned palindromic primes, Crux Mathematicorum, Vol. 7, No. 6, June - July 1981, pp. 168-170.
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))
print(list(islice(agen(), 51))) # Michael S. Branicky, Jun 09 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, May 15 1998
EXTENSIONS
Sequence corrected by Juri-Stepan Gerasimov, Jan 28 2010
Offset corrected by Arkadiusz Wesolowski, Sep 13 2011
STATUS
approved
1 repeated prime(n) times.
+10
22
11, 111, 11111, 1111111, 11111111111, 1111111111111, 11111111111111111, 1111111111111111111, 11111111111111111111111, 11111111111111111111111111111, 1111111111111111111111111111111, 1111111111111111111111111111111111111
OFFSET
1,1
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
LINKS
Fanel Iacobescu, Smarandache Partition Type Sequences, in Bulletin of Pure and Applied Sciences, India, Vol. 16E, No. 2, 1997, pp. 237-240
M. Le and K. Wu, The Primes in the Smarandache Unary Sequence, Smarandache Notions Journal, Vol. 9, No. 1-2. 1998, 98-99.
Eric Weisstein's World of Mathematics, Smarandache Sequences
FORMULA
a(n) = A000042(A000040(n)). - Jason Kimberley, Dec 19 2012
a(n) = (10^prime(n) - 1)/9. - Vincenzo Librandi, May 29 2014
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 *)
PROG
(Magma) [(10^p-1)/9: p in PrimesUpTo(40)]; // Vincenzo Librandi, May 29 2014
CROSSREFS
A004022 is the subsequence of primes. - Jeppe Stig Nielsen, Sep 14 2014
KEYWORD
nonn,easy,base
AUTHOR
J. Castillo (arp(AT)cia-g.com) [Broken email address?]
EXTENSIONS
More terms from Erich Friedman
Corrected and extended by Harvey P. Dale, Apr 10 2012
STATUS
approved
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
OFFSET
0,1
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
LINKS
CROSSREFS
Cf. A004022 (repunit primes), A056710 (near-repdigit primes).
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Nov 28 2001
EXTENSIONS
Corrected by Don Reble, Jan 17 2007
Offset corrected by Sean A. Irvine, Sep 06 2023
STATUS
approved
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
OFFSET
1,1
LINKS
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()
print([next(g) for i in range(25)]) # Michael S. Branicky, Mar 13 2021
KEYWORD
base,nonn
AUTHOR
STATUS
approved
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
OFFSET
1,3
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.
From David A. Corneth, Aug 06 2020: (Start)
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)
LINKS
Sean A. Irvine, Java program (github)
Math Stackexchange, Gaps between Bogotá numbers, 2020.
Puzzling Stackexchange, Pairs of Bogotá numbers, 2020.
EXAMPLE
From David A. Corneth, Aug 06 2020: (Start)
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
KEYWORD
nonn,base
AUTHOR
Sean A. Irvine, Aug 05 2020
STATUS
approved
Near-repunit primes.
+10
16
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
OFFSET
1,1
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.
LINKS
Chris Caldwell, The Prime Glossary, Near-repunit prime
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 *)
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Apr 29 2005
STATUS
approved
Primes with digital product = 2.
+10
16
2, 211, 2111, 111121, 111211, 112111, 1111211, 1111111121, 1111211111, 1121111111, 111111211111, 111211111111, 2111111111111, 111111111111112111, 111111112111111111, 111111211111111111, 112111111111111111
OFFSET
1,1
COMMENTS
Corresponding indices of primes in A107611. Cf. A053666, A101987.
LINKS
FORMULA
A107612(n) = prime(A107611(n)).
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 *)
KEYWORD
base,nonn
AUTHOR
Zak Seidov, May 17 2005
EXTENSIONS
More terms from Robert G. Wilson v and James A. Sellers, May 19 2005
STATUS
approved

Search completed in 0.051 seconds