Problems & Puzzles: Puzzles

 Puzzle 933. p inside p^3. In our Puzzle 337 we asked for primes p such that p is inside p^2. The already known solutions are in A115738. Those days (2006?) Farideh Firoozbakht and Giovanni Resta extended this puzzle to such primes p inside p^3, and both found that "if p is of the form 5*10^n-1 then p appears at the end of p^3". See A093945. Q1. Are there other primes not of the form 5*10^n-1 that appears at the end of p^3? Recently I found a rule that sometimes produces primes p such that p appears at the beginning of p^3. My largest example is a prime composed of 540 digits, while p^3 is composed of 1619 digits (to be shown next week, if necessary) Q2. Find all the primes you can, such that p appear at the beginning of p^3.

Contributions came from Jan van Delden, Paul Cleary, Simon Cavegn, Seiji Tomita, Jeff Heleen, Emmanuel Vantieghem

***

Jan wrote on Nov 24, 2018:

Q1:

For ending digits p (having k digits) we should have:

p^3 = p mod (10^k)

adding d*10^k (d in {1,..,9} and see if the equivalence

relation is still true. Add these extended elements to S and repeat.

I found the solutions of the form 4{9}[k] with k in: {2,3,4,6,14,54,210,390,594} and the following list of different solutions (k<1000):

3 251

3 751

4 1249

5 31249

6 281249

7 4218751

8 74218751

9 574218751

14 69836425781249

15 519836425781249

15 480163574218751

16 2480163574218751

20 84512519836425781249

27 239954784512519836425781249

33 491786760045215487480163574218751

43 1461792218008213239954784512519836425781249

52 1114846846461792218008213239954784512519836425781249

124 3761889074006370471472192093985361783660394122980219875\

66698083827237799888515315353820778199178676004521548748016\

3574218751

127 7751238110925993629528527807906014638216339605877019780\

12433301916172762200111484684646179221800821323995478451251\

9836425781249

160 9078370652478992085606212570656397248761889074006370471\

47219209398536178366039412298021987566698083827237799888515\

3153538207781991786760045215487480163574218751

174 4617900239411040783706524789920856062125706563972487618\

89074006370471472192093985361783660394122980219875666980838\

27237799888515315353820778199178676004521548748016357421875\

1256 690194156131623618083668095104427630771817424340312313\

65935036531422268545246737069617900239411040783706524789920\

85606212570656397248761889074006370471472192093985361783660\

39412298021987566698083827237799888515315353820778199178676\

0045215487480163574218751

274

79838707277256672319019415613162361808366809510442763077181\

74243403123136593503653142226854524673706961790023941104078\

37065247899208560621257065639724876188907400637047147219209\

39853617836603941229802198756669808382723779988851531535382\

07781991786760045215487480163574218751

374

97656646469478124943886311571027612079000331054386556186659\

16551981153106760437514661842492811076660298387072772566723\

19019415613162361808366809510442763077181742434031231365935\

03653142226854524673706961790023941104078370652478992085606\

21257065639724876188907400637047147219209398536178366039412\

29802198756669808382723779988851531535382077819917867600452\

15487480163574218751

378

82655234335353052187505611368842897238792099966894561344381\

33408344801884689323956248533815750718892333970161292722743\

32768098058438683763819163319048955723692281825756596876863\

40649634685777314547532629303820997605889592162934752100791\

43937874293436027512381109259936295285278079060146382163396\

05877019780124333019161727622001114846846461792218008213239\

954784512519836425781249

454

14830601201121114896374193855701995518361001508328570554163\

24022700493612116326552343353530521875056113688428972387920\

99966894561344381334083448018846893239562485338157507188923\

33970161292722743327680980584386837638191633190489557236922\

81825756596876863406496346857773145475326293038209976058895\

92162934752100791439378742934360275123811092599362952852780\

79060146382163396058770197801243330191617276220011148468464\

61792218008213239954784512519836425781249

619

10059642153284066300171052208679961349083446439987633402911\

47534345484887778533678605968270031555417489028540241325704\

26735365518896848779529491201000130878383239761851693987988\

78885103625806144298004481638998491671429445836759772995063\

87883673447656646469478124943886311571027612079000331054386\

55618665916551981153106760437514661842492811076660298387072\

77256672319019415613162361808366809510442763077181742434031\

23136593503653142226854524673706961790023941104078370652478\

99208560621257065639724876188907400637047147219209398536178\

36603941229802198756669808382723779988851531535382077819917\

86760045215487480163574218751

645

28825364369702831545983206899403578467159336998289477913200\

38650916553560012366597088524656545151122214663213940317299\

68444582510971459758674295732646344811031512204705087989998\

69121616760238148306012011211148963741938557019955183610015\

08328570554163240227004936121163265523433535305218750561136\

88428972387920999668945613443813340834480188468932395624853\

38157507188923339701612927227433276809805843868376381916331\

90489557236922818257565968768634064963468577731454753262930\

38209976058895921629347521007914393787429343602751238110925\

99362952852780790601463821633960587701978012433301916172762\

2001114846846461792218008213239954784512519836425781249

752

47554015149911574543119534826917995075391031725437775883032\

61513933763270431009779654340875701605686816882528825364369\

70283154598320689940357846715933699828947791320038650916553\

56001236659708852465654515112221466321394031729968444582510\

97145975867429573264634481103151220470508798999869121616760\

23814830601201121114896374193855701995518361001508328570554\

16324022700493612116326552343353530521875056113688428972387\

92099966894561344381334083448018846893239562485338157507188\

92333970161292722743327680980584386837638191633190489557236\

92281825756596876863406496346857773145475326293038209976058\

89592162934752100791439378742934360275123811092599362952852\

78079060146382163396058770197801243330191617276220011148468\

46461792218008213239954784512519836425781249

...

For primes p having k digits we have:

p^3 = p mod 10^n (1)

with n<=k.

Start with n=1. Then we know that the last digit for all primes p that fulfil (1) don’t change if k>1.
The only digits that are allowed are 1 and 9. [Actually 5 is also allowed, but only for k=1]. So start with S={1,9}.
In the next step add 10*d, where d in {1,2,…,9}. If 10*d+1 or 10*d+9 is a solution for n=1, add these to S.
If the result is prime we found another solution.

I tested this for n<=1000. By that time S consists of 6606 different elements. Some of them may later produce primes.
I didn’t investigate patterns in S. It may be that some elements in S can be discarded by using some simple modulo argument.

After a few steps S looks like:

{[1,9], [49,51,99], [249,251,499,501,749,751,999], [1249,3751,4999,5001,6249,8751,9999]}

Although the subset of the form {9}[n] is not prime itself it generates a possible solution of the form 4{9}[n+1] in the next step.
So these can’t be removed from S.

Another pattern is 5{0}[n]1 (which is divisible by 3). To be save I decided to keep 1 in S, but it seems that the only possible extension is this pattern, and one could dispose of 1.

If we want to hunt patterns, here is a thought, all these numbers are of the form  a*10^k/2^(k-1)+/-1 = 2a*5^k+/-1, with a in [1..2^k],
which makes sense because we must have 10^k|p^3-p and we can’t have divisor 5.In other words: Carlos thanks for the question.

We must see whether 2^k is a divisor of:

p^3-p = 8a^3*5^(3k) +/- 12 a^2 5^(2k)+4a 5^k

for some values of a, or:

2^3*5^k (2a^3*5^(2k)+/-3a^2 5^k+a)

The factor between brackets is mod 2:

a^2+a=a(a+1)=0 mod 2

So we have at least 4 factors 2. For k>4 the expression between the brackets should equal 0 mod 2^(k-3).

Q2:

Consider r=sqrt(10)*10^k and compute n=trunc(r)+1.

If n is prime and |n-r|< 0.5 then n is a solution.

The second condition should be sharpened an itsy bitsy for a full proof.

The following k generate solutions n: 7,72,539, 4469 and 8187.

The number of digits of the corresponding n are k+1.

...

Define r=sqrt(10)*10^k, this real number has k+1 digits before the decimal point.

Define p=trunc(r)+1, this natural number has k+1 digits.

We can write: p=r+e with 0<e<1.

We must have that p^3 starts with p.

Let’s investigate:

p^3=r^3+3r^2e+3re^2+e^3 = (r+e)r^2+2er^2+3re^2+e^3 = pr^2 +2er^2+3re^2+e^3

We see that p^3 starts with pr^2=p*10^(2k+1) as intended.

However the tail of the expression above: 2er^2+3re^2+e^3

may not generate a carry, otherwise we end up with: (p+1)*10^(2k+1).

If 2e<1 the main part of the tail, 2er^2, will not generate a carry.
If we impose e<0.5 this is satisfied.

Factor 2er^2 from the tail:

r^2*  [2e(1+(3e)/(2r)+(e^2)/(2r^2))]

Now clearly the terms on the right hand side, (3e)/(2r) and (e^2)/(2r^2) are extremely small, especially with increasing r.
But strictly speaking we should have a slightly tighter bound than e<0.5.

Computing this bound in formula form is tricky, because we have a 3’d order equation to solve.
We could however get an indication by leaving 2e as is and substituting e=1 for the other terms:

2e (1+3/(2r)+1/(2r^2)) < 1  with r=sqrt(10)10^k

From which we get:

e < ½ - 3/(4r)  if k to infinity.

From which we get:

e < ½ - (3 sqrt(10))/(40*10^k)

Which is even a good approximation if k=1. And to be clear this bound is too strict.

Or as I indicated, one should have e<1/2, or actually an itsy bitsy smaller.

***

On Nov 25, 2018 Paul Cleary wrote:

Here are a few examples for Q2 where p is at the beginning of p^3.

31622777

3162277660168379331998893544432718533719555139325216826857504852792594439

3162277660168379331998893544432718533719555139325216826857504852792594438
6392382213442481083793002951873472841528400551485488560304538800146905195
9670015390334492165717925994065915015347411333948412408531692957709047157
6461044369257879062037808609941828371711548406328552999118596824564203326
9616046913143361289497918902665295436126761787813500613881862785804636831
3495247803114376933467197381951318567840323124179540221830804587284461460
0253577579702828644029024407977896034543989163349222652612067792651676031
04843669779375692615572050037

3162277660168379331998893544432718533719555139325216826857504852792594438
6392382213442481083793002951873472841528400551485488560304538800146905195
9670015390334492165717925994065915015347411333948412408531692957709047157
64610443692578790620378086099418283717115484063285529991185968245642033269
61604691314336128949791890266529543612676178781350061388186278580463683134
95247803114376933467197381951318567840323124179540221830804587284461460025
35775797028286440290244079778960345439891633492226526120677926516760310484
36697793756926155720500369894909469421850007358348844643882731109289109042
34805423565340390727401978654372593964172600130699000095578446310962679069
44183361301813028945417033158077316263863951937937046547652206320636865871
97822049312426053454111609356979828132452297000798883523759585328579251362
96468651149767521712345955923803937562512536985519495532509994703884399033
64661654706472349997961323434030218570521878366763457895107329828751579452
15771652139626324438399018484560935762602031676804240795894693424781414580
65143045332588971446769311137592404705077018546043927212835894192143798432
63432294100698417738335607269111071255492745618417077586544420760256783418
20374148294554615347209934105917023562261159114047327542916270112703017816
95873244724109861492959508808075178526556062831683529768957989002157859291
24420891131680348115611623208391583288567033862533128756421231384677911610
70482296003301672583390123237666596736653097138608591565723617363405570517
18232918905204257697282526510799695039114226220208883780712374821895015301
74909563664670768257847809184484571051880968132858766824070817266599123557
24978410531308966245644125902215675248488599654225874261452076847007303248
15748324978022051473765718909469830851205530345426358092944713519651882669
60994550791194315158059368377069802910695889841247401667026290488552683786
81033508281324650963648962188845370370340457264445851712922958261398828179
21469821480479644401347439891164943802860770642546621241529269007006557505
11024892890319678650629790711699838075502809383201972706549004116860712028
54454371315357347170619598989237747041161379653285626135072832497863416533
98932313828961427813500269637417048850556981362540236017123388897369934534
17252851918847523440684549499653976577654827025830162852577896168933698818
68694435792976987808963081365345826827403433828630951091738804345414880215
42516152381330837661231023558233788652065743002174839869249986716474881391
87453493839581655762136105835492230109518801338213521982355188168102002563
13592893451843399541470744443564024082492630316733167781392758393042263128
41662954034018237355629356675586871393787338303253525496441027337131662866
47067341449201334044027950550200564583262288921760938868973015777262862769
06766968556270908981904451432238468761799803983595799558941302213699053125
80896386189637832756577602828761226990936757411252142350020862869791949849
99028230254841794598306309870166496428501488619606021103693662445488021726
22440131630946920037829640443574935354498602872368930940465194458414383521
03698258242303756407440605567769076030134570243573907119881843845828910325
81854098404636002693966379531573313702049214469526195795159530451162095613
05738651455421711549407043476471917503699425275814682171386007107101905395
96324675694375252799594213356743495069847230988224358674965701491263809702
02893851137155455650147587297071984611242429349104744922298696875890113433
42449671818444294896161030150073466661772665683175549612205672986779257720
17760423555866280673825734798162289705848846951328938367471836627523831860
72814717067927834896569769084499681746675898623182035024811077518111957278
94942507579808255413214661709709586116231152995565227970486750199471870114
34530068350756656565079948088278526277185857751420958669033754497963987899
74096601096570969556048532764103487014140735166799898604324815688117357067
84195557414960928978616044461178761570384260355648875180421264153099516694
11430352878209771402245687278850626145659485760836325597706434986311795439
41707388398425570028038456382184287167185277201856647178709617944421238732
38660092745028491413342498891603839317127824242852307870270008542626998861
55241754999862912124240962713962633554937519329001542271068302726770921712
23548087212220849848700659311820874553923833452836667614459859477475710662
43397241059811325043130514437817530236378651798616222380799869196686033643
38138820168597060854405806161762497106144170112885338853941482285874647554
305905711784490095309647674581031

The last one is a prime with 4470 digits and the cube is 13409 digits in length.

***

On Nov 25, 2018 Simon Cavegn wrote:

Q1:
Ending 99: 5*10^n - 1: https://oeis.org/A093945
Found probably-prime solutions with d digits (searched up to 22467 digits):
d = 3, 4, 5, 7, 15, 55, 211, 391, 595, 3461, 5029, 5220, 5333, 8073, 15797, 16132, 21457

Ending 249: (2*5^(2^n) - 1) mod 10^n (Formula thanks to https://oeis.org/A224473 )
Found probably-prime solutions with d digits (searched up to 29120 digits):
d = 4, 15, 20, 27, 52, 53, 54, 454, 645, 1822, 4152, 19217
Found nearby probably-prime solutions where first digit differs (searched up to 10000 digits):
d = 5, 6, 14, 43, 127, 378, 752, 1484, 4427

Ending 51: (2*16^(5^n) - 1) mod 10^n (Formula thanks to https://oeis.org/A224474 )
Found probably-prime solutions with d digits (searched up to 22317 digits):
d = 3, 7, 8, 9, 15, 619, 2564, 3471, 4186, 8232, 10664, 20106
Found nearby probably-prime solutions where first digit differs (searched up to 10000 digits):
d = 3, 16, 33, 124, 174, 256, 274, 374, 2234, 7410, 8189

Q2:
starting 31622777: Digits of SQRT(10) (last digit may be rounded up)
Found probably-prime solutions with d digits (searched up to 60851 digits):
d = 8, 540, 4470, 8188, 43025

***

On Nov 27, 2018 Seiji wrote:

Q1:
p=(b/a*10^m+1),(b/a*10^m-1)
[m  b/a   p     p^3]
[3, 1/4, 251, 15813251]
[3, 3/4, 751, 423564751]
[4, 1/8, 1249, 1948441249]
[4, 25/8, 31249, 30514648531249]
[4, 225/8, 281249, 22247077149281249]
[4, 3375/8, 4218751, 75084739672864218751]
[4, 59375/8, 74218751, 408828275039673074218751]
[4, 459375/8, 574218751, 189335526025039674574218751]

Q2:
p=floor(sqrt(10^m)+0.5)
m<5000
[m      p         p^3]
[15,   31622777, 31622777796632428411433]

[145,  3162277660168379331998893544432718533719555139325216826857504852792594439,
3162277660168379331998893544432718533719555139325216826857504852792594439
7215235573115037832413994096253054316943198897029022879390922399706189609
300699325629667942316713848429835284001586227896833133212230425621426519]

[1079, 31622776601683793319988935444327185337195551393252168268575048527925944386
39238221344248108379300295187347284152840055148548856030453880014690519596
70015390334492165717925994065915015347411333948412408531692957709047157646
10443692578790620378086099418283717115484063285529991185968245642033269616
04691314336128949791890266529543612676178781350061388186278580463683134952
47803114376933467197381951318567840323124179540221830804587284461460025357
75797028286440290244079778960345439891633492226526120677926516760310484366
9779375692615572050037,
31622776601683793319988935444327185337195551393252168268575048527925944386
39238221344248108379300295187347284152840055148548856030453880014690519596
70015390334492165717925994065915015347411333948412408531692957709047157646
10443692578790620378086099418283717115484063285529991185968245642033269616
04691314336128949791890266529543612676178781350061388186278580463683134952
47803114376933467197381951318567840323124179540221830804587284461460025357
75797028286440290244079778960345439891633492226526120677926516760310484366
97793756926155720500370210181061156299985283302310712234537781421781915303
89152869319218545196042691254812071654799738601999808843107378074641861116
33277396373942109165933683845367472272096124125906904695587358726268256043
55901375147893091776781286040343735095405998402232952480829342841497274070
62697700464956575308088152392124874974926028961008934980010592231201932706
76690587055300004077353131939562858956243266473084209785340342496841095684
56695720747351123201963030878128474795936646391518408210613150437170838697
13909334822057106461377724815190589845962907913193302023629325458526560853
42141452708570367770863251349875619867017743404774592705444499151031436997
67264806714780965524725981118319172558641919455154740332727672277259495461
90191155495201570387276668323116504565023191043730791479623728005562090782
25759806909124898811556141796613404539952617026954328642421990612671954392
27974913473014951693082271665228011927203525669649620211876769516902279578
47038374919721852904578737264318263996434366427426043173956037253108941133
97677568582275150814702175629823041760750405060869970631909400653]

More on Q1:
If p is of the form 5*10^n-1 then p appears at the end of p^(2*m+1).

[2m+1,n,p,p^n]
[5,2,499,30938747502499]
[5,3,4999,3121876249750024999]
[5,4,49999,312468751249975000249999]
[5,6,4999999,3124996875001249999750000024999999]
[5,14,499999999999999,31249999999999687500000000
001249999999999997500000000000002499999999999999]

[7,2,499,7703779066869753499]
[7,3,4999,78015690603129374475034999]
[7,4,49999,781140631562281254374947500349999]
[7,6,4999999,78124890625065624978125004374999475000034999999]
[7,14,499999999999999,781249999999989062500000000065624999999
9997812500000000004374999999999994750000000000003499999999999999]

[9,2,499,1918248691429635491004499]
[9,3,4999,1949612186187893671260499100044999]
[9,4,49999,1952773465623687539374212510499910000449999]
[9,6,4999999,1953121484377812498687500393749921250010499999100000044999999]
[9,14,499999999999999,19531249999999648437500000002812499999999986875000000
00003937499999999992125000000000010499999999999991000000000000004499999999999999]

[11,2,199,19381341794579313317802199]
[11,2,499,477645842414670666895611255499]
[11,3,1999,2036764117802210446778721319780021999]
[11,3,2999,176498542483156373314239274454505032999]
[11,3,4999,48720810482447649032693543770623625054999]
[11,4,49999,4881738388665429945305281394372937520624862500549999]
[11,5,199999,20478873628159577604223970432147839472001319997800002199999]
[11,6,2999999,177146350462082563917435721709663202112265973270004454999505000032999999]
[11,6,4999999,48828017578232421810546900781242781251443749793750020624998625000054999999]
[11,7,19999999,204799887360028159995776000422399970432001478399947200001319999978000000219999999]
[11,7,29999999,17714693504611082564891743507217099663202011226599732700004454999950500000329999999]
[11,14,499999999999999,4882812499999892578125000001074218749999993554687500000025781249999999927812
50000000014437499999999979375000000000020624999999999986250000000000005499999999999999]

[13,2,499,118934292407095410727674098230506499]
[13,3,4999,1217533102677177231774660691521428160748050064999]
[13,4,49999,12203857802706446708934102903098187902183031285749805000649999]
[13,6,4999999,1220699951175683590957032646483872265759062473187504021874553125035749998050000064999999]
[13,14,499999999999999,12207031249999682617187500003808593749999972070312500000139648437499999497265625
0000013406249999999973187500000000040218749999999955312500000000035749999999999980500000000000006499999999999999]

***

Jeff Heleen wrote on Nov 29, 2018:

Q1. In my search I only looked at primes p<2^32. I also looked at powers n from 3 to 20 as shown in the table below. As well as primes of the form 5*10^n-1 there are primes of other forms. The first column shows solutions where the prime is found at the end of the number. The second column shows primes that appear at the beginning of the number. Many of these primes repeat throughout the odd powers.

Perhaps the most interesting prime is 7499 which, for powers n=9 and 17, appears at both the beginning and end:

7499^9 = 74994632695013731827926060475067499

7499^17 = 749992656762237977038017320503425360262553344102235443117350127499

These are the only two powers n <671 that have this property. Are there any other primes that have this property?

Other primes form groups like {1249, 31249, 281249, 481249, 881249, 3781249, 4531249, 8281249, 9781249, 55781249, 63281249, 85781249} which all have the same last 4 digits and {4218751, 14218751, 74218751, 574218751, 674218751} which all have the same last 7 digits.

 Power, n Primes at end of p^n Primes at beginning of p^n 3 5, 251, 499, 751, 1249, 4999, 31249, 49999, 281249, 4218751, 4999999, 74218751, 574218751 31622777 4 5 none 5 2, 3, 5, 7, 43, 193, 251, 307, 443, 499, 557, 751, 1249, 1693, 3307, 4999, 5443, 5807, 7057, 7499, 20807, 22943, 31249, 49999, 52057, 54193, 56249, 79193, 97943, 281249, 672943, 4218751, 4999999, 5422943, 8281249, 8704193, 17077057, 74218751, 407922943, 574218751, 657922943, 2500000001, 3092077057 17783 6 5, 41, 61, 401, 601, 4001, 600000001 631 7 5, 251, 499, 751, 1249, 4999, 31249, 49999, 281249, 4218751, 4999999, 74218751, 574218751 none 8 5 2, 139 9 2, 3, 5, 7, 43, 193, 251, 307, 443, 499, 557, 751, 1249, 1693, 3307, 4999, 5443, 5807, 7057, 7499, 14557, 16693, 18749, 20807, 22943, 31249, 37501, 49999, 52057, 54193, 56249, 60443, 62501, 68749, 79193, 97943, 281249, 672943, 829193, 920807, 952057, 1249999, 3750001, 4218751, 4531249, 4999999, 5422943, 6672943, 8281249, 8704193, 12499999, 17077057, 54577057, 62500001, 63281249, 70422943, 74218751, 282922943, 407922943, 574218751, 657922943, 2500000001, 3092077057 4217, 7499 10 5 13 11 5, 11, 19, 29, 31, 41, 59, 61, 71, 79, 89, 101, 149, 151, 199, 251, 349, 401, 449, 499, 599, 601, 701, 751, 1249, 1999, 2999, 3001, 4001, 4751, 4999, 7001, 8999, 9001, 28751, 31249, 48751, 49999, 59999, 70001, 71249, 79999, 90001, 91249, 118751, 199999, 281249, 318751, 418751, 481249, 599999, 700001, 799999, 881249, 900001, 918751, 2218751, 2999999, 3781249, 4218751, 4999999, 9781249, 14218751, 19999999, 29999999, 30000001, 45781249, 55781249, 59999999, 74218751, 85781249, 89999999, 574218751, 600000001, 674218751, 700000001, 799999999 2, 631, 1259 12 5 none 13 2, 3, 5, 7, 43, 193, 251, 307, 443, 499, 557, 751, 1249, 1693, 3307, 4999, 5443, 5807, 7057, 7499, 20807, 22943, 31249, 49999, 52057, 54193, 56249, 79193, 97943, 281249, 672943, 4218751, 4999999, 5422943, 8281249, 8704193, 17077057, 74218751, 407922943, 574218751, 657922943, 2500000001, 3092077057 none 14 5 29 15 5, 251, 499, 751, 1249, 4999, 31249, 49999, 281249, 4218751, 4999999, 74218751, 574218751 139 16 5, 41, 61, 401, 601, 4001, 600000001 631 17 2, 3, 5, 7, 43, 193, 251, 307, 443, 499, 557, 751, 1249, 1693, 3307, 4999, 5443, 5807, 7057, 7499, 14557, 16693, 18749, 20807, 22943, 31249, 37501, 49999, 52057, 54193, 56249, 60443, 62501, 68749, 79193, 97943, 218749, 281249, 281251, 391693, 437501, 562501, 672943, 687499, 733307, 735443, 812501, 829193, 858307, 920807, 937501, 952057, 1093751, 1249999, 2702057, 3124999, 3170807, 3750001, 4218751, 4531249, 4999999, 5422943, 6672943, 8079193, 8170807, 8281249, 8704193, 9375001, 10045807, 12499999, 17077057, 18750001, 30468751, 35045807, 39172943, 39954193, 54577057, 62500001, 63281249, 64954193, 70422943, 72545807, 74218751, 89172943, 103795807, 282922943, 386718751, 407922943, 574218751, 657922943, 761718751, 904577057, 937499999, 937500001, 2500000001, 2532922943, 3092077057, 3958704193 487, 4217, 7499 18 5 2, 3, 114504757 19 5, 251, 499, 751, 1249, 4999, 31249, 49999, 281249, 4218751, 4999999, 74218751, 574218751 19 20 5 3, 7

***

Emmanuel wrote on Nov 30, 2018:

Besides the numbers of the form  5*10^n - 1  there is another sequence that can give primes that end in their cube :

51, 251, 751, 3751, 8751, 18751, 68751, 218751, 718751, 4218751, 9218751, 24218751, 74218751, 574218751, 3574218751,...
This sequence is constructed as follows :
*  the starting number is  51 (whose third power ends with 51)
*  If  m  is a k-digit number in that sequence, the next one is found by searching the least  m' > m  whose last k-1 digits are those of  m  and whose cube ends in  m'.
Example : m =  574218751.  The next number must be of the form  s574218751  and it is immediately computed that  s  will be  35 (it is the solution of a simple congruence).
Using this I found the following primes :
251, 751, 4218751, 74218751,
574218751  (9 digits)
480163574218751  (15 digits)
2480163574218751  (16 digits)
491786760045215487480163574218751  (33 digits)
37618890740063704714721920939853617836603941229802198756669808382723779988851531535382077819917867600
45215487480163574218751  (124 digits)
90783706524789920856062125706563972487618890740063704714721920939853617836603941229802198756669808382
72377998885153153538207781991786760045215487480163574218751  (160 digits)
46179002394110407837065247899208560621257065639724876188907400637047147219209398536178366039412298021
9875666980838272377998885153153538207781991786760045215487480163574218751  (174 digits)
69019415613162361808366809510442763077181742434031231365935036531422268545246737069617900239411040783
70652478992085606212570656397248761889074006370471472192093985361783660394122980219875666980838272377
998885153153538207781991786760045215487480163574218751  (256 digits)
79838707277256672319019415613162361808366809510442763077181742434031231365935036531422268545246737069
61790023941104078370652478992085606212570656397248761889074006370471472192093985361783660394122980219
875666980838272377998885153153538207781991786760045215487480163574218751  (274 digits)
97656646469478124943886311571027612079000331054386556186659165519811531067604375146618424928110766602
98387072772566723190194156131623618083668095104427630771817424340312313659350365314222685452467370696
17900239411040783706524789920856062125706563972487618890740063704714721920939853617836603941229802198
75666980838272377998885153153538207781991786760045215487480163574218751  (374 digits)
10059642153284066300171052208679961349083446439987633402911475343454848877785336786059682700315554174
89028540241325704267353655188968487795294912010001308783832397618516939879887888510362580614429800448
16389984916714294458367597729950638788367344765664646947812494388631157102761207900033105438655618665
91655198115310676043751466184249281107666029838707277256672319019415613162361808366809510442763077181
74243403123136593503653142226854524673706961790023941104078370652478992085606212570656397248761889074
00637047147219209398536178366039412298021987566698083827237799888515315353820778199178676004521548748
0163574218751  (619 digits)
The last one is certified prime by PRIMO.

About the primes  p  whose third power starts with  p  it is easy to prove that they should be of the form  Ceiling(Sqrt^10^(2k+1)).
Indeed, if  m  is the start of  m^3, we can write  m^3 = m*10^a + r  with  0 <= r < 10^a.
Clearly, r  must be divisible by  m  whence we can write : m^2 = 10^a + w,  with the additional condition : w*m < 10^a.
So, when this condition is satisfied it is clear that  m  is the ceiling of  sqrt(10^a).  Of course, if  m  must be prime, a must be odd.
This gave the following primes :

31622777
3162277660168379331998893544432718533719555139325216826857504852792594439  (73 digits)
316227766016837933199889354443271853371955513932521682685750485279259443863923822134424810837930029518
734728415284005514854885603045388001469051959670015390334492165717925994065915015347411333948412408531
692957709047157646104436925787906203780860994182837171154840632855299911859682456420332696160469131433
612894979189026652954361267617878135006138818627858046368313495247803114376933467197381951318567840323
124179540221830804587284461460025357757970282864402902440797789603454398916334922265261206779265167603
104843669779375692615572050037  (540 digits; certified prime by PRIMO in  2 m52")
and another probable prime of  4470 digits (and maybe infinitely many others).

In addition, I found a few "sporadic" primes that are somewhere in their cube : 8089, 18229, 9590417, 68171507.

***

 Records   |  Conjectures  |  Problems  |  Puzzles