[libmath-prime-util-perl] 24/72: Primorial primes print a bit faster
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:49:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.32
in repository libmath-prime-util-perl.
commit 9749d8c098637190794c632fed1ba6e69704acd2
Author: Dana Jacobsen <dana at acm.org>
Date: Wed Sep 11 17:52:40 2013 -0700
Primorial primes print a bit faster
---
bin/primes.pl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/bin/primes.pl b/bin/primes.pl
index 1bca862..e188254 100755
--- a/bin/primes.pl
+++ b/bin/primes.pl
@@ -40,6 +40,9 @@ $| = 1;
#
# A006794 p where p#-1 prime 3,5,11,13,41,89,317,337
# A057704 n where p_n#-1 prime 2,3,5,6,13,24,66,68,167
+#
+# As an aside, the 18th p#-1 is 15877, but the 19th is 843301.
+# The p#+1's are a bit denser, with the 22nd at 392113.
# There are a few of these prime filters that Math::NumSeq supports, and in
@@ -159,6 +162,9 @@ if ($start > $end) {
if (exists $opts{'pillai'}) {
$segment_size = ($start < 10000) ? 100 : 1000; # very small for Pillai
}
+ if (exists $opts{'pnp1'} || exists $opts{'pnm1'}) {
+ $segment_size = 500;
+ }
if (exists $opts{'palindromic'}) {
$segment_size = 10**length($start) - $start - 1; # all n-digit numbers
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git
More information about the Pkg-perl-cvs-commits
mailing list