Are the solutions of $x^2 = -y^2 \mod n$ always based off of $x^2 = -1 \mod n$

151 Views Asked by At

We know that if $x_i^2 = -1 \mod n$ we are able to find more solutions of the form, $x^2 = -y^2 \mod n$

Simple Proof:

Let $x_i$ be the initial solution to $x_i^2+1 \equiv 0 \mod n$

$y^2x_i^2+y^2 \equiv 0 \mod n$

$x^2 = -y^2 \mod n$, $x = x_iy$, $\forall x_i \in \Bbb Z$

But must $x_i$ produce ALL solutions, thus every solution $(x,y)$ for $x^2 = -y^2 \mod n$ must be of the form: $(x,x \cdot x_i \mod n)$

Example: The solutions of $x^2 = -y^2 \mod 13$ are (in $(y,x)$ form ):

(0,0)(1, 5) (1, 8) (2, 3) (2, 10) (3, 2) (3, 11) (4, 6) (4, 7) (5, 1) (5, 12) (6, 4) (6, 9) (7, 4) (7, 9) (8, 1) (8, 12) (9, 6) (9, 7) (10, 2) (10, 11) (11, 3) (11, 10) (12, 5) (12, 8)

The initial solutions of $x_i^2 = -1$ are $x_i = 5, x_i = 8 $. Therefore every answer defined is of form: $(x,x \cdot x_i \mod n)$

(2, 5*2) =  (2, 10)
(2, 8*2) =  (2, 3)

(3, 5*3) =  (3, 2)
(3, 8*3) =  (3, 11)
2

There are 2 best solutions below

0
On BEST ANSWER

$x=3, y=3$ is a solution of $x^2 \equiv-y^2 \bmod 9$, but $x^2 \equiv -1 \bmod 9$ has no solution.

In general, $x^2 \equiv-y^2 \bmod n$ has a non-zero solution iff the prime factors of $n$ of the form $4k+3$ appear with even exponent in the factorization of $n$.

It is true though, and easy to prove, that all non-zero solutions of $x^2 \equiv-y^2 \bmod n$ come from a solution of $x^2 \equiv -1 \bmod n$ when $n$ is prime (not of the form $4k+3$).

2
On

For example, try $n = 8$: you have no solutions of $x_i^2 = -1 \mod 8$, but you do have solutions of $x^2 = -y^2 \mod 8$, namely $$(x,y) = (0, 0), (0, 4), (2, 2), (2, 6), (4, 0), (4, 4), (6, 2), (6, 6)$$