If N=(6a+1)(6*b+1)
C=(N-1)/6
A=(2*C^2+C) mod N
B=N-A
(-16C^2-8C-1) mod N =X
(-B+16C^3+6C^2) mod N =Y
(-12C^4-4C^3+A*B) mod N=Z
we get
Xab+Ya+Yb+Z=N*W
so
Xab+Ya+Yb+Z mod N = 0
How does sagemath solve Xab+Ya+Yb+Z mod N = 0 knowing X,Y,Z,N without factoring N? Is there a computationally efficient way to solve this?
Example: N=403=13*31
179ab+97a+97b+352 mod 403 = 0