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++
}