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 <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2020-09-26 21:32:27 +01:00
parent c6a6a04280
commit 3dd5b562e1
1 changed files with 4 additions and 1 deletions

View File

@ -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<<twoadicity) != 1:
continue
sys.stdout.write('.')
sys.stdout.flush()