![]() |
![]() |
#1 |
Apr 2016
2×13 Posts |
![]()
I've come up with the following question that is there a prime quadruplet emirp (of all 4 terms), n digits long?
There is a prime quadruplets frequency I forgot, but if anyone would be able to find one, say 32 digits, I could possibly have the same problem with twin prime, triples, and k-tuples, are all emirps. Here is a small example for twins: 18911, 18913, 11981, 31981, ALL members are emirps too, and I thought this would be a challenging puzzle, yet hard. Thanks to all solvers. |
![]() |
![]() |
![]() |
#2 |
(loop (#_fork))
Feb 2006
Cambridge, England
2×3,191 Posts |
![]()
You have eight numbers (x, x+2, x+6, x+8, and their reverses) that need to be prime, log(n)^-8 is more than 10^-n for large enough n. So there are masses of examples, they'll be a bit tedious to find because of considering carries when doing the sieve for the reverses
no five-digit example 389561 1285511 36306071 126716201 |
![]() |
![]() |
![]() |
#3 | |
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
![]() Quote:
Code:
5 7 727 733 739 743 751 919 1193 1201 1213 1217 1223 1229 1231 3371 3373 7177 9011 9769 9781 10039 10061 10067 11551 11699 11701 11777 11897 11903 11909 11923 11953 11959 12107 13147 13259 13693 14563 14891 14897 14923 15493 15497 15511 16561 18169 18719 18731 18743 18749 19219 19531 19661 31891 32467 34543 34549 34583 35117 35129 35141 35311 36097 36187 36251 38351 38903 39791 39799 39821 70241 70921 72227 72307 72313 72547 72551 74747 75721 77323 78607 78887 79379 79393 79397 79399 79531 90121 91183 92297 92479 92959 93581 94121 95111 95791 96263 96857 97397 98573 99397 102593 104059 105653 105667 106391 106397 108187 109849 109859 113189 118543 119773 119783 119797 121921 125627 125639 125641 125651 125821 126547 129587 129589 133709 139387 139393 139591 141157 143291 144407 144409 149561 149563 149579 149867 150217 155557 157061 157427 159697 162293 162343 162359 163781 163789 163811 166723 167381 167771 169067 169069 170689 170759 170761 171929 173249 175267 175463 176903 176921 176923 177743 178333 178349 178681 179173 181751 181757 181759 182011 186103 191627 193261 193283 193541 193877 193883 193993 194713 194839 195077 197383 197389 197419 198193 302123 302597 302767 303119 303571 303781 305867 307277 309599 311279 313763 314239 316073 316087 316501 317599 317663 323087 324031 324053 324893 324901 325163 325181 333923 333929 334759 334771 334777 334783 334787 336689 336703 336727 339671 339673 340429 341293 348053 350111 360169 361499 362431 362749 363719 366953 367687 375787 375799 375997 381103 381287 381859 381911 383083 386371 387503 389287 389297 389561 391537 392911 392923 392927 393361 393373 393377 393919 397597 397921 701383 701399 701593 701609 701837 703663 709381 712289 712301 714361 714377 714443 714577 714893 715361 715373 715397 717151 718813 720133 720869 722633 722639 724733 729877 736447 737897 738349 738953 741563 742499 743989 744019 744043 744071 744377 744389 747833 758987 760273 768841 773953 776801 777349 777353 777419 779003 779011 779021 780047 780049 786673 786691 786833 788449 788467 790271 790421 795761 798781 798799 799313 905213 910909 910939 910957 910981 918347 918353 919381 919393 919559 919679 920957 920963 920971 920999 922223 922237 922717 924643 928429 928453 928457 928463 940553 941449 941453 941461 941467 944821 944833 947641 947987 948581 948593 951089 954697 957241 960937 966431 971141 971143 971149 972029 972031 975089 975941 979273 979403 980717 980909 981391 981517 981523 982273 982703 983929 987029 991181 991927 993397 993527 994087 994093 995443 995447 995461 996539 996551 996563 999623 Last fiddled with by science_man_88 on 2016-04-21 at 18:26 |
|
![]() |
![]() |
![]() |
#4 |
Romulan Interpreter
Jun 2011
Thailand
927510 Posts |
![]()
All the twins: (pari/gp, one minute exercise, there are many more if disparate primes, i.e. if "==2" test is omitted)
Code:
gp > p=2; while(p<10^5, np=nextprime(p+1); if(np-p==2&&isprime(rp=eval(concat(Vecrev(Str(p)))))&&isprime(rnp=eval(concat(Vecrev(Str(np))))),print(p","np","rp","rnp)); p=np) 3,5,3,5 5,7,5,7 11,13,11,31 71,73,17,37 149,151,941,151 179,181,971,181 311,313,113,313 1031,1033,1301,3301 1151,1153,1511,3511 1229,1231,9221,1321 3299,3301,9923,1033 3371,3373,1733,3733 3389,3391,9833,1933 3467,3469,7643,9643 3851,3853,1583,3583 7457,7459,7547,9547 7949,7951,9497,1597 9011,9013,1109,3109 9437,9439,7349,9349 10007,10009,70001,90001 10067,10069,76001,96001 10457,10459,75401,95401 10499,10501,99401,10501 10889,10891,98801,19801 11159,11161,95111,16111 11699,11701,99611,10711 11717,11719,71711,91711 11777,11779,77711,97711 11969,11971,96911,17911 12071,12073,17021,37021 12107,12109,70121,90121 13709,13711,90731,11731 13757,13759,75731,95731 13829,13831,92831,13831 13931,13933,13931,33931 14447,14449,74441,94441 14549,14551,94541,15541 14591,14593,19541,39541 15731,15733,13751,33751 16061,16063,16061,36061 16451,16453,15461,35461 17207,17209,70271,90271 17681,17683,18671,38671 17747,17749,74771,94771 17909,17911,90971,11971 18911,18913,11981,31981 19421,19423,12491,32491 19541,19543,14591,34591 30851,30853,15803,35803 31721,31723,12713,32713 32321,32323,12323,32323 32939,32941,93923,14923 33809,33811,90833,11833 34469,34471,96443,17443 34589,34591,98543,19543 34841,34843,14843,34843 34961,34963,16943,36943 35051,35053,15053,35053 35801,35803,10853,30853 36107,36109,70163,90163 37199,37201,99173,10273 37307,37309,70373,90373 37547,37549,74573,94573 37571,37573,17573,37573 38327,38329,72383,92383 38921,38923,12983,32983 39827,39829,72893,92893 70949,70951,94907,15907 70997,70999,79907,99907 71261,71263,16217,36217 71387,71389,78317,98317 72227,72229,72227,92227 72251,72253,15227,35227 72869,72871,96827,17827 74759,74761,95747,16747 75167,75169,76157,96157 75539,75541,93557,14557 76259,76261,95267,16267 78779,78781,97787,18787 78887,78889,78887,98887 79229,79231,92297,13297 79397,79399,79397,99397 79841,79843,14897,34897 92381,92383,18329,38329 92639,92641,93629,14629 93557,93559,75539,95539 94109,94111,90149,11149 94151,94153,15149,35149 94349,94351,94349,15349 94397,94399,79349,99349 94541,94543,14549,34549 94649,94651,94649,15649 95801,95803,10859,30859 96179,96181,97169,18169 97379,97381,97379,18379 97787,97789,78779,98779 98729,98731,92789,13789 time = 63 ms. gp > Last fiddled with by LaurV on 2016-04-22 at 02:49 |
![]() |
![]() |
![]() |
#5 |
Romulan Interpreter
Jun 2011
Thailand
52·7·53 Posts |
![]()
On the same idea, consecutive triples, regardless of the distance:
Code:
gp > p=2; while(p<10^5, np=nextprime(p+1); nnp=nextprime(np+1);if(isprime(rp=eval(concat(Vecrev(Str(p)))))&&isprime(rnp=eval(concat(Vecrev(Str(np)))))&&isprime(rnnp=eval(concat(Vecrev(Str(nnp))))),print(p","np","nnp" - "rp","rnp","rnnp)); p=nnp) 2,3,5 - 2,3,5 5,7,11 - 5,7,11 11,13,17 - 11,31,71 149,151,157 - 941,151,751 179,181,191 - 971,181,191 727,733,739 - 727,337,937 739,743,751 - 937,347,157 751,757,761 - 157,757,167 919,929,937 - 919,929,739 1201,1213,1217 - 1021,3121,7121 1217,1223,1229 - 7121,3221,9221 1229,1231,1237 - 9221,1321,7321 1237,1249,1259 - 7321,9421,9521 1381,1399,1409 - 1831,9931,9041 1499,1511,1523 - 9941,1151,3251 1723,1733,1741 - 3271,3371,1471 3083,3089,3109 - 3803,9803,9013 3343,3347,3359 - 3433,7433,9533 3371,3373,3389 - 1733,3733,9833 3389,3391,3407 - 9833,1933,7043 3463,3467,3469 - 3643,7643,9643 7177,7187,7193 - 7717,7817,3917 7673,7681,7687 - 3767,1867,7867 9013,9029,9041 - 3109,9209,1409 9479,9491,9497 - 9749,1949,7949 9769,9781,9787 - 9679,1879,7879 9787,9791,9803 - 7879,1979,3089 10039,10061,10067 - 93001,16001,76001 10067,10069,10079 - 76001,96001,97001 10487,10499,10501 - 78401,99401,10501 11579,11587,11593 - 97511,78511,39511 11701,11717,11719 - 10711,71711,91711 11779,11783,11789 - 97711,38711,98711 11897,11903,11909 - 79811,30911,90911 11909,11923,11927 - 90911,32911,72911 11927,11933,11939 - 72911,33911,93911 11953,11959,11969 - 35911,95911,96911 11969,11971,11981 - 96911,17911,18911 12107,12109,12113 - 70121,90121,31121 12743,12757,12763 - 34721,75721,36721 13147,13151,13159 - 74131,15131,95131 13267,13291,13297 - 76231,19231,79231 13693,13697,13709 - 39631,79631,90731 13931,13933,13963 - 13931,33931,36931 14591,14593,14621 - 19541,39541,12641 14891,14897,14923 - 19841,79841,32941 14923,14929,14939 - 32941,92941,93941 15493,15497,15511 - 39451,79451,11551 15511,15527,15541 - 11551,72551,14551 15731,15733,15737 - 13751,33751,73751 16103,16111,16127 - 30161,11161,72161 16193,16217,16223 - 39161,71261,32261 16561,16567,16573 - 16561,76561,37561 17033,17041,17047 - 33071,14071,74071 17203,17207,17209 - 30271,70271,90271 17903,17909,17911 - 30971,90971,11971 18181,18191,18199 - 18181,19181,99181 18719,18731,18743 - 91781,13781,34781 18743,18749,18757 - 34781,94781,75781 18757,18773,18787 - 75781,37781,78781 19231,19237,19249 - 13291,73291,94291 19531,19541,19543 - 13591,14591,34591 19681,19687,19697 - 18691,78691,79691 30517,30529,30539 - 71503,92503,93503 30643,30649,30661 - 34603,94603,16603 31051,31063,31069 - 15013,36013,96013 31081,31091,31121 - 18013,19013,12113 31907,31957,31963 - 70913,75913,36913 32203,32213,32233 - 30223,31223,33223 32479,32491,32497 - 97423,19423,79423 32933,32939,32941 - 33923,93923,14923 33911,33923,33931 - 11933,32933,13933 34129,34141,34147 - 92143,14143,74143 34543,34549,34583 - 34543,94543,38543 34583,34589,34591 - 38543,98543,19543 35117,35129,35141 - 71153,92153,14153 35141,35149,35153 - 14153,94153,35153 35311,35317,35323 - 11353,71353,32353 36107,36109,36131 - 70163,90163,13163 36187,36191,36209 - 78163,19163,90263 36251,36263,36269 - 15263,36263,96263 37547,37549,37561 - 74573,94573,16573 37997,38011,38039 - 79973,11083,93083 38083,38113,38119 - 38083,31183,91183 38351,38371,38377 - 15383,17383,77383 38629,38639,38651 - 92683,93683,15683 38917,38921,38923 - 71983,12983,32983 39799,39821,39827 - 99793,12893,72893 39827,39829,39839 - 72893,92893,93893 39887,39901,39929 - 78893,10993,92993 70241,70249,70271 - 14207,94207,17207 70327,70351,70373 - 72307,15307,37307 70663,70667,70687 - 36607,76607,78607 70921,70937,70949 - 12907,73907,94907 71347,71353,71359 - 74317,35317,95317 71387,71389,71399 - 78317,98317,99317 71899,71909,71917 - 99817,90917,71917 72227,72229,72251 - 72227,92227,15227 72307,72313,72337 - 70327,31327,73327 72337,72341,72353 - 73327,14327,35327 72547,72551,72559 - 74527,15527,95527 72559,72577,72613 - 95527,77527,31627 74071,74077,74093 - 17047,77047,39047 74441,74449,74453 - 14447,94447,35447 74509,74521,74527 - 90547,12547,72547 74747,74759,74761 - 74747,95747,16747 75211,75217,75223 - 11257,71257,32257 75721,75731,75743 - 12757,13757,34757 76213,76231,76243 - 31267,13267,34267 76253,76259,76261 - 35267,95267,16267 76379,76387,76403 - 97367,78367,30467 76801,76819,76829 - 10867,91867,92867 77323,77339,77347 - 32377,93377,74377 77587,77591,77611 - 78577,19577,11677 78623,78643,78649 - 32687,34687,94687 78779,78781,78787 - 97787,18787,78787 78809,78823,78839 - 90887,32887,93887 78887,78889,78893 - 78887,98887,39887 79379,79393,79397 - 97397,39397,79397 79397,79399,79411 - 79397,99397,11497 79411,79423,79427 - 11497,32497,72497 79537,79549,79559 - 73597,94597,95597 79669,79687,79691 - 96697,78697,19697 79757,79769,79777 - 75797,96797,77797 90127,90149,90163 - 72109,94109,36109 90247,90263,90271 - 74209,36209,17209 90863,90887,90901 - 36809,78809,10909 91183,91193,91199 - 38119,39119,99119 92119,92143,92153 - 91129,34129,35129 92297,92311,92317 - 79229,11329,71329 92489,92503,92507 - 98429,30529,70529 92987,92993,93001 - 78929,39929,10039 93601,93607,93629 - 10639,70639,92639 94151,94153,94169 - 15149,35149,96149 94889,94903,94907 - 98849,30949,70949 95131,95143,95153 - 13159,34159,35159 95791,95801,95803 - 19759,10859,30859 96001,96013,96017 - 10069,31069,71069 96263,96269,96281 - 36269,96269,18269 96893,96907,96911 - 39869,70969,11969 97423,97429,97441 - 32479,92479,14479 98251,98257,98269 - 15289,75289,96289 98597,98621,98627 - 79589,12689,72689 98717,98729,98731 - 71789,92789,13789 99401,99409,99431 - 10499,90499,13499 time = 113 ms. gp > Last fiddled with by LaurV on 2016-04-22 at 02:57 |
![]() |
![]() |
![]() |
#6 |
Romulan Interpreter
Jun 2011
Thailand
52·7·53 Posts |
![]()
When the distance is put in: (all to 1e9)
Code:
gp > p=2; d=8; while(p<10^9, np=nextprime(p+1); nnp=nextprime(np+1); nnnp=nextprime(nnp+1); if(nnnp-p<=d&&isprime(rp= eval(concat(Vecrev(Str(p)))))&&isprime(rnp=eval(concat(Vecrev(Str(np)))))&&isprime(rnnp=eval(concat(Vecrev(Str(nnp)))))&&isprime (rnnnp=eval(concat(Vecrev(Str(nnnp))))),print(p","np","nnp","nnnp" - "rp","rnp","rnnp","rnnnp)); p=np) 2,3,5,7 - 2,3,5,7 3,5,7,11 - 3,5,7,11 5,7,11,13 - 5,7,11,31 389561,389563,389567,389569 - 165983,365983,765983,965983 1285511,1285513,1285517,1285519 - 1155821,3155821,7155821,9155821 3200201,3200203,3200207,3200209 - 1020023,3020023,7020023,9020023 36306071,36306073,36306077,36306079 - 17060363,37060363,77060363,97060363 75681911,75681913,75681917,75681919 - 11918657,31918657,71918657,91918657 76605491,76605493,76605497,76605499 - 19450667,39450667,79450667,99450667 90561851,90561853,90561857,90561859 - 15816509,35816509,75816509,95816509 126716201,126716203,126716207,126716209 - 102617621,302617621,702617621,902617621 139984541,139984543,139984547,139984549 - 145489931,345489931,745489931,945489931 141272471,141272473,141272477,141272479 - 174272141,374272141,774272141,974272141 151851641,151851643,151851647,151851649 - 146158151,346158151,746158151,946158151 160436951,160436953,160436957,160436959 - 159634061,359634061,759634061,959634061 182746841,182746843,182746847,182746849 - 148647281,348647281,748647281,948647281 301397141,301397143,301397147,301397149 - 141793103,341793103,741793103,941793103 337425371,337425373,337425377,337425379 - 173524733,373524733,773524733,973524733 371610131,371610133,371610137,371610139 - 131016173,331016173,731016173,931016173 374964041,374964043,374964047,374964049 - 140469473,340469473,740469473,940469473 700788701,700788703,700788707,700788709 - 107887007,307887007,707887007,907887007 712457561,712457563,712457567,712457569 - 165754217,365754217,765754217,965754217 768415091,768415093,768415097,768415099 - 190514867,390514867,790514867,990514867 771810881,771810883,771810887,771810889 - 188018177,388018177,788018177,988018177 936019151,936019153,936019157,936019159 - 151910639,351910639,751910639,951910639 975697271,975697273,975697277,975697279 - 172796579,372796579,772796579,972796579 time = 6min, 40,889 ms. gp > ![]() Last fiddled with by LaurV on 2016-04-22 at 03:46 |
![]() |
![]() |
![]() |
#7 |
Apr 2016
2×13 Posts |
![]()
Thanks LaurV,
I can use those results to record the (approximate) occurance of prime quadruplet (k-tuplet) emirps. As for verifying all four terms are emirps, I was unable to handle this using ntheory. |
![]() |
![]() |
![]() |
#8 |
Sep 2002
Database er0rr
1110000010102 Posts |
![]()
To reverse a number use scalar reverse on the number.
Code:
perl -e 'print((scalar reverse 335)."\n")' 533 Last fiddled with by paulunderwood on 2016-04-22 at 06:54 |
![]() |
![]() |
![]() |
#9 |
"Dana Jacobsen"
Feb 2011
Bangkok, TH
22·227 Posts |
![]()
Assuming I'm understanding the problem:
Code:
perl -Mntheory=:all -E 'for (sieve_prime_cluster(1,10**10,2,6,8)) { say if is_prime(reverse("".$_)) && is_prime(reverse("".$_+2)) && is_prime(reverse("".$_+6)) && is_prime(reverse("".$_+8)) }' For 10^9 this seems to generate the same results as LaurV's barring 2 and 3 which don't match the pattern. Some larger results: 10^20 + 5526684241 10^21 + 6826587001 10^22 + 23496012391 10^23 + 51139069771 10^28 + 34613950651 10^32 + 1181613772801 It's better for the large results to use a loop over the cluster sieve so it only spends a reasonable amount of time getting quadruplets before testing them. I'm envious of Python's yield for this (which lets one stream output instead of returning it in a big chunk). Something like: Code:
perl -Mntheory=:all -E 'use bigint; my $s = 10**28; while (1) { say "-- $s"; for (sieve_prime_cluster($s,$s+1e10,2,6,8)) { say if is_prime(reverse("".$_)) && is_prime(reverse("".$_+2)) && is_prime(reverse("".$_+6)) && is_prime(reverse("".$_+8)) } $s += 1e10; }' Even better is modifying the example threaded cluster sieve to restrict results with the reversal condition for whatever cluster is being used. That would be nice for larger clusters. Last fiddled with by danaj on 2016-04-22 at 17:46 |
![]() |
![]() |
![]() |
#10 |
"Robert Gerbicz"
Oct 2005
Hungary
101101001012 Posts |
![]()
In the above there is a lot of no emirp (and broken codes), see for the definition: https://en.wikipedia.org/wiki/Emirp .
|
![]() |
![]() |
![]() |
#11 | |
"Dana Jacobsen"
Feb 2011
Bangkok, TH
22·227 Posts |
![]() Quote:
I didn't check for palindromes but other than 5, it doesn't look like my code is outputing any (but it could). With C = {0,2,6,8} all the results p are such that p+c and reverse(p+c) are both prime for all c in C. Last fiddled with by danaj on 2016-04-22 at 19:18 |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
(M48) NEW MERSENNE PRIME! LARGEST PRIME NUMBER DISCOVERED! | dabaichi | News | 571 | 2020-10-26 11:02 |
disk died, prime work lost forever? where to put prime? on SSD or HDD? | emily | PrimeNet | 3 | 2013-03-01 05:49 |
Top-5 prime quadruplet found | gd_barnes | Riesel Prime Search | 10 | 2007-10-27 01:54 |
Prime Cullen Prime, Rest in Peace | hhh | Prime Cullen Prime | 4 | 2007-09-21 16:34 |
How do I determine the xth-highest prime on prime pages? | jasong | Data | 7 | 2005-09-13 20:41 |