Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $test = 7920;
- $prime = 7919;
- $numprimes = 1000;
- print "Prime $numprimes is $prime\n";
- until ($numprimes == 10001) {
- if ( (1 x $test) !~ (/^1?$|^(11+?)\1+$/) ) {
- $prime = $test;
- $numprimes++;
- print "Prime $numprimes is $prime\n";
- }
- $test++;
- }
Add Comment
Please, Sign In to add comment