From 3dd5b562e101535f202a914c57b7cafd2fcbf19d Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Sat, 26 Sep 2020 21:32:27 +0100 Subject: [PATCH] amicable.sage: the 2-adicity of p could be less than specified when using stretch (doesn't affect Tweedle curves). Signed-off-by: Daira Hopwood --- amicable.sage | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amicable.sage b/amicable.sage index 917503c..050b616 100644 --- a/amicable.sage +++ b/amicable.sage @@ -16,7 +16,7 @@ DEFAULT_TWOADICITY = 32 DEFAULT_STRETCH = 0 COEFFICIENT_RANGE = (5,) -#COEFFICIENT_RANGE = range(1, 10000) +#COEFFICIENT_RANGE = range(1, 100) ACCEPTABLE_PRIMES = (5,) #ACCEPTABLE_PRIMES = Primes() @@ -98,6 +98,9 @@ def symmetric_range(n, base=0, step=1): def find_nice_curves(strategy, L, twoadicity, stretch, wid, processes): for (p, T, V) in strategy(L, max(0, twoadicity-stretch), wid, processes): + if p % (1<