![]() |
|
|
#1 |
|
Dec 2011
After milion nines:)
5·172 Posts |
I would like to find all primes between 1000000 and 9999999 that have next
characteristic . to have three groups of two same number examples 1 77 88 99 1 00 66 33 1 11 66 77 |
|
|
|
|
|
#2 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
Code:
[1000033,1000099,1001177,1002299,1004477,1006633,1007711,1110077,1115533,1115599,1116677,1117799,1220077,1220099,1223311,1225577,1226611,1226677,1226699,1229911,1229999,1332277,1334477,1335533,1338811,1338877,1440011,1441133,1441199,1442299,1443311,1444411,1444477,1445533,1445599,1446611,1447711,1447777,1447799,1448833,1449911,1449977,1550033,1550099,1551133,1552277,1553311,1553333,1557733,1558811,1558877,1559933,1661111,1662211,1665533,1665577,1667711,1667777,1668833,1669933,1669999,1770077,1771177,1773377,1774433,1774499,1775533,1777733,1777799,1778899,1881199,1882211,1883377,1885577,1886611,1886699,1889999,1990033,1991177,1992299,1994477,1995533,2001199,2002211,2004433,2006611,2006677,2009911,2009977,2009999,2110033,2110099,2111177,2113333,2113399,2115511,2116633,2117711,2117777,2118811,2118833,2118877,2220077,2221111,2225533,2225599,2227777,2330099,2333377,2333399,2335577,2339933,2339977,2441111,2444411,2445533,2445577,2448877,2449933,2449999,2551177,2552233,2554477,2557777,2660011,2661199,2662211,2666633,2667799,2668877,2669977,2771177,2774411,2774477,2775599,2776699,2778833,2778877,2884411,2884433,2885599,2887711,2887777,2887799,2990033,2991199,2993311,2993399,2995511,2996611,2996633,2998811,2999911,2999933,2999999,3000077,3001133,3004499,3005599,3006677,3007777,3009977,3110011,3110033,3113333,3113399,3115577,3116611,3116699,3117799,3119999,3220033,3221111,3222211,3223333,3223399,3228811,3228877,3228899,3331177,3332233,3333311,3334411,3335533,3335599,3336677,3337777,3338899,3339977,3440011,3440077,3441133,3442277,3444499,3445511,3447733,3447799,3448877,3552233,3552277,3552299,3554477,3555599,3558811,3559999,3660011,3661111,3663311,3663377,3664499,3770033,3771133,3773377,3774499,3776677,3777799,3880033,3880099,3881177,3882233,3883333,3884411,3885533,3885577,3885599,3886699,3887777,3889933,3990011,3991111,3991199,3993377,3994411,3994499,3998899,4001111,4001177,4003333,4006633,4006699,4007777,4009933,4111199,4112233,4112299,4113311,4114477,4115599,4117777,4118833,4119977,4220077,4222277,4223311,4223333,4226611,4229933,4330099,4332277,4332299,4335511,4335577,4336699,4338811,4440011,4441111,4441133,4442233,4443311,4446677,4448833,4550011,4551199,4552211,4554499,4555511,4558811,4662299,4665533,4666633,4667777,4668877,4668899,4770011,4771177,4774411,4774477,4774499,4777711,4777733,4778833,4880011,4881133,4881199,4882211,4882277,4883311,4885577,4886677,4886699,4889933,4889977,4992233,4994411,4994477,4999933,4999999,5000011,5000077,5002211,5006611,5007733,5008811,5111177,5112277,5112299,5113399,5115511,5115533,5115577,5115599,5220077,5221133,5221199,5223377,5224433,5225533,5225599,5227777,5228833,5229911,5330033,5331199,5332211,5333311,5334499,5337733,5337799,5338811,5338877,5442233,5442277,5445577,5446633,5447777,5448899,5550011,5551111,5552233,5553311,5554433,5554499,5660033,5662211,5662277,5663377,5664499,5666677,5669933,5669977,5771111,5772233,5774411,5777711,5779999,5881111,5881177,5885533,5885599,5886611,5886677,5887711,5887733,5888899,5996611,5996633,5996677,5999911,5999933,6000011,6004499,6005533,6006677,6007711,6007733,6008833,6009911,6009977,6110011,6112277,6113333,6116633,6116699,6119933,6119977,6220099,6221177,6222233,6222299,6223333,6224411,6225533,6228877,6229933,6331133,6332299,6334411,6335533,6335599,6337777,6338833,6339911,6440011,6440099,6441199,6443377,6443399,6445577,6446611,6446633,6447733,6448811,6550099,6551177,6552233,6552277,6556699,6557777,6558899,6660011,6661111,6662233,6663311,6667711,6668833,6668899,6770011,6770033,6772211,6774433,6776611,6776677,6777733,6779911,6779999,6880099,6883399,6885511,6888877,6991111,6991133,6992233,6994411,6994433,6995533,6996611,6997733,6998833,6999911,7000033,7004477,7005511,7006633,7111199,7112233,7113311,7114433,7114477,7119977,7220033,7221199,7224433,7224499,7226633,7226699,7227799,7228811,7331111,7335533,7336633,7336699,7337777,7339999,7440011,7441111,7441177,7442233,7443377,7444477,7444499,7447777,7447799,7550099,7551133,7552277,7553333,7554499,7556611,7557799,7558877,7559911,7559933,7559999,7660099,7661111,7662211,7663399,7664477,7665533,7666699,7667711,7668833,7668877,7771177,7774433,7774499,7775533,7880011,7882211,7883333,7883377,7883399,7885511,7886633,7886699,7888877,7889977,7991177,7992277,7995577,7997711,7997777,8000033,8000099,8002277,8005511,8006611,8006633,8006699,8007733,8008811,8008877,8009977,8009999,8110033,8112211,8112277,8115533,8115577,8221111,8221177,8224499,8225533,8226611,8227777,8227799,8332277,8334433,8334499,8335577,8336677,8338877,8442299,8444411,8444477,8445599,8447711,8449999,8550011,8552233,8557711,8557777,8557799,8558833,8558899,8660033,8660077,8663311,8664433,8667733,8669911,8770033,8771177,8772233,8772299,8776633,8776699,8778899,8779933,8881111,8881199,8882233,8884433,8885533,8886611,8887777,8889977,8990011,8990099,8992211,8993333,8993377,8993399,8997733,8998877,9000011,9001199,9002233,9003377,9006611,9006677,9008899,9009977,9111199,9113399,9115511,9117733,9118877,9119933,9119977,9228811,9228833,9228899,9331111,9331199,9334477,9334499,9337711,9337733,9339977,9440033,9440077,9441199,9442211,9443311,9443333,9445511,9445577,9446677,9448877,9449933,9551111,9551177,9552299,9553399,9554477,9555599,9556699,9557711,9557777,9558877,9559999,9664411,9664477,9667711,9668833,9668899,9772211,9772277,9773311,9779933,9779977,9880033,9881111,9882233,9883333,9885511,9886633,9887711,9889933,9991133,9991199,9994499,9995533,9995599,9997711,9997777] |
|
|
|
|
|
|
#3 | |
|
Dec 2011
After milion nines:)
5×172 Posts |
Quote:
Thanks! |
|
|
|
|
|
|
#4 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
|
|
|
|
|
|
#5 |
|
Dec 2011
After milion nines:)
101101001012 Posts |
You mean,why I ask for?
Try to use those primes as exponents . And new twinsieve is coming, so will try to make sieve for + and -side in one pass Batalov-thanks for hint! P.S how you find them? Last fiddled with by pepi37 on 2018-09-26 at 23:21 |
|
|
|
|
|
#6 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
a forprime loop with an if statement using 6 calls to digits() and concatenation onto a vector that then gets returned.
Last fiddled with by science_man_88 on 2018-09-26 at 23:35 |
|
|
|
|
|
#7 |
|
Jun 2003
5,051 Posts |
|
|
|
|
|
|
#8 |
|
"Dana Jacobsen"
Feb 2011
Bangkok, TH
22×227 Posts |
Using regex:
Code:
perl -Mntheory=:all -E 'forprimes { say if /\d(\d)\g1(\d)\g2(\d)\g3/ } 1e6,1e7-1;'
Code:
perl -Mntheory=:all -E 'forprimes { @d=todigits($_); say if $d[1]==$d[2] && $d[3]==$d[4] && $d[5]==$d[6]; } 1e6,1e7-1;'
|
|
|
|
|
|
#9 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
|
|
|
|
|
|
#10 |
|
Jun 2003
5,051 Posts |
|
|
|
|
|
|
#11 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| M Prime Numbers | Anirban | Information & Answers | 1 | 2018-07-02 05:26 |
| What can you do with 2 prime numbers? | VicDiesel | Programming | 12 | 2017-04-20 21:16 |
| Prime Numbers Or Not | Arxenar | Miscellaneous Math | 38 | 2013-06-28 23:26 |
| All odd numbers are prime | Citrix | Lounge | 5 | 2010-04-05 21:34 |
| Prime numbers | Unregistered | Miscellaneous Math | 8 | 2008-11-09 07:45 |