11
$\begingroup$

Notice that $2021$ is a concatenation of consecutive integers: $20\sim 21$
Also $2021$ is a product of consecutive primes: $43\times 47$.

What is the next number with both of these properties?
$24502451$ is close, $4943\times 4957$ but $4951$ is in between.
$2484224843$ is close, $49831\times 49853$ but $49843$ is in between.
$715353612\sim 715353607$ isn't quite there but is $845785793\times 845785799$

Are there any other numbers with the $2021$ property?

$\endgroup$
5
  • 8
    $\begingroup$ Why the hell did you even think of this😑😂 $\endgroup$ – Aryan Dec 25 '20 at 16:10
  • 4
    $\begingroup$ This might be an efficient way to search for an example. There are no primes between two twin primes, which are of the form $6k\pm 1$. The product of twin primes is thus of the form $36k^2-1$. It would be relatively easy for a computer to search numbers of that form for the kind of concatenation you seek. Then it would be necessary to confirm that $6k\pm 1$ were in fact primes. This of course would not find all possible examples, but it might find one or more examples. A similar approach could be applied to primes that differ by $4$. $\endgroup$ – Keith Backman Dec 25 '20 at 18:43
  • 1
    $\begingroup$ @KeithBackman I would expect there to be only finitely many examples where the primes are twins. Maybe none. $\endgroup$ – Robert Israel Dec 25 '20 at 19:53
  • 7
    $\begingroup$ Well, amazingly enough there is at least one: $891077215721081784886888257701070827 \times 891077215721081784886888257701070829 = 794018604377235322848433897872605582794018604377235322848433897872605583$ $\endgroup$ – Robert Israel Dec 25 '20 at 20:12
  • 4
    $\begingroup$ This post was mentioned in The Guardian. $\endgroup$ – Peter Kagey Dec 28 '20 at 18:12
5
$\begingroup$

I found more twin prime solutions. For $n = 396$, $d = 2$ I found four; the smallest is $x =$ $${\small 434219772837481616940726338933362452273916097301492635627291443512051997247961750150908315825206335025681182252954355463934702107964728269885096262688644034853639395077615105799339919571601786192665103151170947581386505769710635828116973131647706180301379657813220432413064536727826883282252811784121256116486385454859849292857777667719016881251956101283374338871503089431823276421261037909974359}$$

For $n = 420, d= 2$ I found $x =$

$${\small797632045320122442922746848370123218495083238021539262463793196558953236606673684986633691999805212011226776035396567202878987657452660659814874176096052099397205337415190293836597252999499063444222715671072742933640380698030812583452694556061309433747142801949662038045758937332990610602377203706320829077950947557183280793831442171456664369310820656043310649088552521802135329739094023210425721483954126295715977820771}$$

I wrote a Java program to find modular square roots using known factorizations of $10^n+1$ at https://stdkmd.net/nrr/repunit/10001.htm

The $n = 396$ solution shown may not be the second smallest twin prime solution because I did not analyse $10^n+1$ with unknown factorization (eg: $323, 392$).

Note that all these solutions involve only probable primes.

UPDATE:

I analyzed all $n \le$ 500 for which complete factorizations are known, using Shank's $(ln\ 10^n)^2$ estimate for prime gaps: $2 \le d < 5.3n^2$. The following table shows the number of solutions of $n$ for each $d$.

\begin{array}{r|l|r} d & n & total \\ \hline 2 & 36 \ 396(4) \ 420 \ 468 & 7 \\ 4 & 2 \ 70 \ 150 \ 154 \ 210(27) \ 270(8) \ 298 \ 306(2) \ 330(216) \ 350(4) \ 390(10) \ 450(519) & 791 \\ 12 & 370(3) & 3 \\ 14 & 336(2) \ 396(3) & 5 \\ 54 & 72 & 1 \\ 76 & 150(2) \ 210(16) \ 238 \ 270(4) \ 306(2) \ 330(209) \ 350(3) \ 390(15) \ 450(464) & 716 \\ 82 & 288 \ 336 \ 396(5) & 7 \\ 136 & 370(2) & 2 \\ 478 & 336(2) \ 420(2) & 4 \\ 1364 & 350 \ 370 & 2 \\ \hline \end{array}

I analyzed many of the remaining known factorizations ($10^{2021}+1$ is not one of them!). I found another twin prime solution: $n=1008$ with $d=2$, $x=$

$${\small415119285335713138107859159895921470120127901771012286705147863784377859054383205862088683121228843823644091024472578295715781891723489781341595609399956375971523325157129204031439607287157565203433091945798569106366453441681028958853009984899996962841286597261664058243897757317082387302022827796188228872367615940280481644558354868664735437056336615963301573812328050683875074515986286867031968871583403569829949341102058719072290611202615565955752049854880027669507042067569064851453754109081689314779674580036777493429088593987592215948631397812098103849006767378312184473327978598863061300578414744304808368322583101196999821431867760847600988156486022394149378510713398269801057016361947970128875578649362095899180615435692074486807012156095811778896443290518016088027948808773134635025220295845062105375107159001836188571569967805721691214024809680987944490924904786048603374165125520526174101682333287056313013054613391604106858759925794745594124906616469238525225716143856670923606283395248479131507}$$

I found three large solutions: $n=1530$ with $d=4$, $n=2442$ with $d=4$, and $n=3011$ (odd!) with $d=20690$ and $x=$

$${\small88690623974342445320706035164907895149666724533149745483024674929494064077161748069463728371848588950263928708885107056062087458873420997129551966175554795722180833514256206712208756791349423181129064370039115228768196330069003307522127855902035611295636718786724552834173077606816947565351851981240290592919330234435002605544818898704383050138705647019342509295291603847356454590383853903649034831518476190799174284971745361604565835545543751726529610775367997499873686078754015523170389723175091842178101899712480880871125974133817901518538674999703972616649632379652346395327832021456141800194701647932112291489233775928062470099635623529564608650310241193184759187003057364275380404785676729319256559060638811849744657325135099995176231775532397706618363314457193916318557002601459452270771049765689157482464270159966495073998419806308753511281083712198273207669118838966447628803262451478908503097089308456131000369654881518026667709557445311154935973975062432608109650859738547758359753161811236281693386411516599337580682444733887155249147703101490725039867545594773022646082904694935305608529996539856673800894879204151359288642251946537962882362542598385355877258435885255720463281832318996714749127620565928295871807381765069313332957959393036520560765777218866425812066806566968512664298253194097198110254106398916193178093323285510247757090049514423671929016532305341758972853095343072371415631421656596311059421635680366649419960217875499119738356663626923434263846557987005717753122760707664468827714474707911315796646846223047293968656604803860055531395007086544292734839551265327070525560544860595807571049301946018895129458512514361858289027536454436450967551887360811792658089837039529387070983777359590036217218745184175803793616945894809150630864349323615934382263207217535053701872322473625965756309360763380729005686068625698261693375747392352007831638590079855262236534947866527970435414431816193335704235728803592301557775355412534721854441649050543489915852763945114633640120859359425753981309635846954784400203166716706835000886558080563709914367339817642986577630512066137497993335131126095180539966000395250657557890723647715298981683035616063901855227374869260175148423588397623462842825972640026055333967889877654729507728851982076103225242572504527429707508826564462178655965426323365276645348503046435607191738892135058428362640796305615358118855629551341911741579489817482134866791604658301235483655504562219338888352571792484327753544399478907161167075036271824602275963945345494267916881834140919492205225308097367770069805455016950009471893642408322180438063500438940054744323617310086174876710854406021502917708656972234075774384689936433268632860789883740306973585819078135116827900294591791739792869006503475384136963506082899865375050762137583035828837915859970271078112397338135202345323724701287354928723862525723289692127491314630211880612187498071770083275673021172070970359804795314571223002210253991420896839561827296295193582310969508838235157649439819871296875917}$$

UPDATE (May 28, 2021)

I attempted to find solutions bigger than $n = 3011$, but found none! I rewrote my program in C using GMP and ran it on AWS with 96 cores. The following table summarises my results for all known complete factorizations of $10^n+1$ for $n > 3011$. For each $n$ the search was up to $d$ for the given ratio $\frac{d}{n}$. Note that a ratio of $\mathbf{2.3}$ corresponds to the expected number of primes in the range $[10^n,10^n+2.3n] = 1$, a ratio of $\mathbf{96}$ corresponds to the current record prime gap (of $8350$ for an $87$ digit prime number), and a ratio of $\mathbf{6.9}$ corresponds to the biggest solution I found: $n=3011, d=20690$.

\begin{array}{r|l} n & \frac{d}{n} \\ \hline <22292 & 100 \\ 22292 & 21 \\ 22303 & 10 \\ 23592 & 53 \\ 23734 & 3 \\ 26014 & 10 \\ 32962 & 10 \\ 46957 & 3 \\ 47248 & 12 \\ 64439 & 1.0 \\ 80363 & 1.0 \\ 95594 & 1.0 \\ 103624 & 1.0 \\ 132586 & 1.0 \\ ^*180178 & 0.10 \\ ^*268207 & 0.10 \\ ^*1600787 & - \\ \hline \end{array}

$^*$For the last three values of $n$ the largest prime factor is a probable prime. I did not analyse the last value, because I estimate that a single calculation of $x^y$ mod $z$ with 1600000 digit numbers would take about 70 hours.

UPDATE (June 11, 2021)

The largest known solutions, $x$ and $x+d$, have been certified using Primo and recorded in factordb.com - search for primes with 3011 digits.

$\endgroup$
10
$\begingroup$

If $p$ is prime and $q$ is the next prime and $pq$ has $2n$ digits, the probability that $pq$ is the concatenation of consecutive integers is heuristically about $10^{-n}$. For $pq$ to have $2n$ digits (i.e. $10^{2n-1} \le pq < 10^{2n}$), $p$ must be between about $10^{n-1/2}$ and $10^n$, and there are approximately $$\frac{10^{n}}{n \ln 10} - \frac{10^{n-1/2}}{(n-1/2) \ln 10} \sim \frac{10 - \sqrt{10}}{10 \ln(10)} \frac{10^n}{n}$$ such primes. Thus we expect about $0.297/n$ examples with $2n$ digits. Since the harmonic series diverges, there should be infinitely many, but the next one could be quite large and hard to find. I've checked by brute force that there are no further examples with up to $16$ digits.

EDIT: To expand on my comment above:

The concatenation of $y$ and $y+1$, where $y+1$ has $n$ digits, is $(10^n+1) y + 1$, and thus $\equiv 1 \mod (10^n+1)$.
Given an even positive integer $d$ and positive integer $n$, you can solve the equation $x(x+d) \equiv 1 \mod (10^n+1)$, and then check in each solution that $10^{2n} > x(x+d) \ge 10^{2n-1}$ and $x$ is prime and $x+d$ is the next prime. For $n \le 36$ and $d \le 10000$ the only solutions found are $n=2$, $d=4$, $x = 43$, $x(x+d) = 2021$ and that amazing $n=36$, $d=2$, $x=891077215721081784886888257701070827$, $x(x+d)=794018604377235322848433897872605582794018604377235322848433897872605583$.

$\endgroup$
1
  • 1
    $\begingroup$ k=5018676928083894672666012088036109843105301546773725102790665815794437. a=2518711810848159770018909254809359591672377471484881441744436703324716. Then k(k+4) = a~(a+1) $\endgroup$ – Ed Pegg Dec 27 '20 at 16:55
4
$\begingroup$

I've found two more solutions, bringing the total to 4 solutions. I've posted code here.

$794018604377235322848433897872605582\sim794018604377235322848433897872605583 = 891077215721081784886888257701070827\times891077215721081784886888257701070829$

$2518711810848159770018909254809359591672377471484881441744436703324716\sim2518711810848159770018909254809359591672377471484881441744436703324717 = 5018676928083894672666012088036109843105301546773725102790665815794437\times5018676928083894672666012088036109843105301546773725102790665815794441$

$353879205744237011544616255111782082608671961515039134082358165448687146\sim353879205744237011544616255111782082608671961515039134082358165448687147 = 594877471202462845078583461328011525336167267541426222873827376039101347\times594877471202462845078583461328011525336167267541426222873827376039101401$

$\endgroup$
3
$\begingroup$

I would have just commented but I don't have sufficient reputation. A quick brute-force approach in bases 2 to 16 is here and shows solutions where the second part of the concatenation contains leading zeros. Hence 249950~00249951 = 4999493*4999507.

$\endgroup$
1
  • 1
    $\begingroup$ Then we may as well add 24999999999999999999999999999999500000000000000000000000000000002499999999999999999999999999999951 $\endgroup$ – Ed Pegg Dec 27 '20 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.