As the lowest p^10 exceeds the precision available in Visual Basic (it has 19 digits, as seen below), UBASIC was used, under DOSBox:
5 open "p10spcl.txt" for output as #2
10 while P10<99999999999999999999999999999999
20 P=nxtprm(P)
30 P10=P*P*P*P*P:P10=P10*P10
40 S$=str(P10)
50 Srce$="0123456789"
60 Good=1
70 for I=1 to 10
80 if instr(S$,mid(Srce$,I,1))=0 then Good=0:cancel for:goto 100
90 next
100 if Good then
105 :if Ct>0 then print Ct:print #2,Ct:endif
110 :print P;str(P10):print #2,P;str(P10):Ct=0
120 :else inc Ct
130 wend
150 close #2
The 19th prime, 67, is the lowest whose 10th power contains all 10 digits.
The numbers intervening between the primes and their 10th powers that fit the description listed below show the number of intervening primes that fail to meet the criterion. As the 10th powers become larger, each one has a greater likelihood of having all the digits, so the gaps between non-fits become smaller and less frequent.
18
67 1822837804551761449
3
83 15516041187205853449
9
137 2329194047563391944849
2
151 6162677950336718514001
1
163 13239635967018160063849
1
173 24013807852610947920649
6
211 174913992535407978606601
1
227 363294289954110647868649
9
277 2659485890900719634874649
1
283 3295067800663118480459449
293 4663115832631376345704249
307 7436759805837217107346249
311 8464550303319308288547601
2
331 15786284949774657045043801
337 18892916655137732057698849
347 25310151684662980796181049
349 26807373765254438673009001
3
373 52130071199257068815346649
3
397 97253461433805715000527049
3
421 174912544792453358346502201
1
433 231674888957051615288276449
439 265855226381706476903427601
2
457 397339737654378065640319249
461 433520115685490720702646601
463 452699390921229872008282849
1
479 635850671321437457459323201
487 750394448018639455972876849
491 814357163924275931995589401
499 957206097023388110011245001
503 1036763861454476003909724049
1
521 1473591924952786487925133201
523 1531147003165845604229778649
541 2147695222527137498891207401
6
587 4857144371993096171902453849
2
601 6148153756249382761936206001
1
613 7492120352012921267174929849
2
631 10006762501329395540915206801
641 11710630960672484548954118401
2
653 14097165966879236484266511049
659 15447355662831141299710475401
2
677 20224914151912685933807022649
683 22090575837180674640752471449
691 24818782535914467768701411401
701 28653665037714694102182057001
709 32096845506516383920668257401
719 36922313359187619548244760801
2
739 48578531695030075776442554601
4
769 72320829380154899085462412801
3
809 120084019435520610159775496401
811 123085967045938218547531752601
1
823 142560218431877459191575717649
827 149642548378589035457984790649
829 153301112139724882769277052201
1
853 203934316504189676181259377049
857 213701819195980161082078147249
6
907 376767011703542749261101388249
1
919 429689868625634225501910718801
2
941 544372570681789282481196251401
947 580095892065127629623589183049
953 617915381969049828620453160049
1
971 745061803065730690750719610201
977 792402135334027660597541583649
1
991 913558883040682586951726894401
1
1009 1093733872802526507260136674401
1013 1137874732397032526105297221849
1019 1207096081374615112024889047801
1
1031 1357021263671984015854738690801
1
1039 1466072594754994452219317781601
1
1051 1644474563565989751942777123001
1
1063 1842182469756309773938865020849
1069 1948843891164479242385262049801
1
1091 2389172492422689937648139855401
1
1097 2523865899030501209758389996049
1103 2665355388374552289094103022049
1109 2813944072277932332748750613401
1117 3023651481566388603275857817449
1123 3190050532444758047838177756649
1129 3364646318655149518033174309201
1
1153 4152341586657848098473435426049
1
1171 4848070768657369381097155672201
1181 5278359623878552774340709709801
1187 5552738093466546144133466815849
1193 5839886905510184257662663991249
1
1213 6896170790228275534651691767849
1217 7126983975202027668329968664449
1
1229 7861742750443423214189056528201
1231 7990620944964601562553351832801
1237 8388745064171653982358874141849
1249 9238987589682764184336007800001
1259 10005926331657404826061000709401
1
1279 11714006071361516311685439475201
1283 12085554015438371186846267489449
1289 12662783263238858255384077491601
1291 12860635297577242291503992477401
1
1301 13892262011451220148404716063001
1
1307 14546411725825779139203515416249
2
1327 16932037772659338838775736975649
1361 21806263317960671515439166765601
1367 22786894713095597130003654122449
1373 23807038395436052116504126476649
1381 25231134911761774155441593551801
1399 28719517871453000049926808186001
1409 30839684831314582312276485830401
3
1433 36514209582527818811780028806449
1
1447 40242533215980874846883634768049
1451 41368914405341012492749742127001
1453 41942676713311852147148995575049
1
1471 47438038942261552120809896515201
1
1483 51453095802482700024198747695449
1
1489 53573124675257581527363423309601
1493 55029818098573228516291079620249
2
1523 67142735848150219470136134408649
1531 70754148210526575834581598295801
1543 76499616963756636870228467179249
1
1553 81604584391921475272607698758049
1559 84812751313490671426290625976401
1
1571 91571820943889124079441046596201
1579 96343251677561117001381202882201
1
1597 107906886404720396377065272331049
|
Posted by Charlie
on 2015-06-12 11:01:57 |