mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2016-04-22, 19:27   #12
danaj
 
"Dana Jacobsen"
Feb 2011
Bangkok, TH

22·227 Posts
Default

To handle proper emirps:
Code:
perl -Mntheory=:all -E 'sub isemirp { $r=reverse("".$_[0]); $r ne $_[0] && is_prime($r) && is_prime($_[0]); } for (sieve_prime_cluster(1,10**10,2,6,8)) { say if isemirp($_) && isemirp($_+2) && isemirp($_+6) && isemirp($_+8); }'
Adjust the "say" command as desired if you want output other than just the first prime of each qudruplet.
danaj is offline   Reply With Quote
Reply



Similar Threads
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

All times are UTC. The time now is 03:35.


Sat Jul 17 03:35:33 UTC 2021 up 50 days, 1:22, 1 user, load averages: 1.84, 1.92, 1.69

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.