View Single Post
Old 2021-06-23, 15:40   #1
RomanM
 
Jun 2021

3×17 Posts
Default Why this code converge?

p- any composite number
for small p, inner loop may be less than 250, its heuristic)

Code:
{p=1237*1234577; c=ceil(sqrt(p));
 for(n=c,c+10000,
 b=lift(Mod(n^2,p));a=lift(Mod(b^2,p)); 
for(y=1,250,
 t=ceil(sqrt(b^2-a));
b=lift(Mod(t^2,p));a=lift(Mod(b^2,p)); 
if(b<c,break());); localprec(7); b=b/c/1.; if(b<.1,print(b);););}
Regards,
Roman
RomanM is offline   Reply With Quote