I searched a lot, but found no answers to my questions.
I am interested in difference of integer squares being semiprime (RSA number) and posted about:
Odd prime iff unique difference of 2 squares
Is it known that
- an odd prime p has a unique difference of squares $p = (\frac{p+1}{2})^2 - (\frac{p-1}{2})^2$?
- semi prime $n=p*q$ with odd primes $p, q$ has exactly two differences of squares, the "canonical" of (1) and $n = (2a+1)(2b+1) = (a+b+1)^2 + (b-a)^2$?
- if non-canonical difference of squares is known for semi prime $n = c^2 - d^2$ with $c-d > 1$, then factorization of $n$ is easy, its two prime factors are just $c+d$ and $c-d$?
Any links or references are welcome.
>>> from RSA_numbers_factored import RSA, digits
>>> RSA = RSA()
>>> l,n,p,q = RSA.get(59)[0:4]
>>> l == digits(n) == 59
True
>>> n == p*q
True
>>> RSA.square_diffs(59)
[[278934861111101959940264512227, 78505642990286405670520876790], [35820760380875717727566808237833545217031666114123935897715, 35820760380875717727566808237833545217031666114123935897714]]
>>> for a,b in RSA.square_diffs(59):
... n == a**2 - b**2
...
True
True
>>>