View Single Post
Old 2021-07-30, 13:19   #12
Alberico Lepore
 
Alberico Lepore's Avatar
 
May 2017
ITALY

20A16 Posts
Default

range ok h >=1


I tried to write the pseudo code

Code:
i=0

while(i<10) {

solve this system and memorize y(i) and r(i)

sqrt(N/((10+i)/10))=a 
, 
((10+i)/10*a+a-4)/8=x 
, 
2*x*(x+1)-y*(y-1)/2=(N-3)/8 
, 
(sqrt(32*x+1)+1)/2=b 
, 
b*(b-1)/2-(sqrt(32*(x-b)+1)+1)/2*[(sqrt(32*(x-b)+1)+1)/2-1]/2=r

}

j=0

while (!(N mod p ==0 && p!=1 && p!=N)){

i=0

while(i<10) {

solve this system with unique integer solution of h

2*(h)*(h-1)<(N-3)/8+k*(k-1)/2<=2*(h)*(h+1)
,
2*(x)*(x+1)-y*(y-1)/2=(N-3)/8
,
x-(sqrt(32*x+1)+1)/2<h<x+(sqrt(32*x+1)+1)/2
,
k=y(i)+j*r(i)

in the range [y(i)+(j-1)*r(i),y(i)+j*r(i)] in log_2 search the point if the system admit solutions 

if you find it {

x-(sqrt(32*x+1)+1)/2=h

aproximate x to integer

2*(x)*(x+1)-y*(y-1)/2=(N-3)/8

calculate p

p=4*x+1-2*(y-1)
}
i++
}

j++
}

Last fiddled with by Alberico Lepore on 2021-07-30 at 14:52 Reason: in log_2 search the point if the system admit solutions if you find it {
Alberico Lepore is offline   Reply With Quote