# Theorem: Odd positive integer N is a prime number if …

Is the following theorem well known?

Theorem Odd positive integer N is a prime number if and only if there is no non-trivial solution for Diophantine equation

$x^2−y^2=N$

(trivial solution: $x=(N+1)/2; y=(N−1)/2)$

I believe this is true and quite clear. Say $p$ is odd and $p = ab$, and $a \geq b > 1$. Solve for $x+y = a$, $x-y = b$. This is possible over the integers since $a$ and $b$ are odd.