ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 14 Nov 2017 09:39:45 +0100Loop is not finishing executionhttps://ask.sagemath.org/question/39530/loop-is-not-finishing-execution/I have the following Sage code:
p1 = 2
p2 = 5
e1 = ceil(100*log(2,p1))
e2 = ceil(5060*log(2,p2))
f = 1
p = p1^e1*p2^e2-1
while p not in Primes():
f = f + 1
p = p1^e1*p2^e2*f-1
p
I'm running this code in Sage Notebook, in a cell, but the value of `p` is never printed. I guess it is not finishing the execution. If I run the same code in Magma, it finishes after few seconds with the result of `p`. Any ideas what the problem might be?whateverTue, 14 Nov 2017 09:39:45 +0100https://ask.sagemath.org/question/39530/