Prove-idea for writing an odd prime number as a difference of two square-numbers

214 Views Asked by At

You can generate an odd natural number $n$ by subtracting two square-numbers:

$$n = 2k + 1 \qquad k \in \mathbb{N}_0 \\ \Leftrightarrow n = k^2 + 2k + 1 - k^2 = (k+1)^2 - k^2 $$

Now is it sufficient to say that every odd primenumber can be generated inimitably with

$n = (k+1)^2 - k^2$

since

$n = 2k + 1$ is a linear function and a bijection?

enter image description here

1

There are 1 best solutions below

4
On BEST ANSWER

If I understood what you were asking -- technically, yes, the formula $n = 2k+1$ gives a bijection between odd natural numbers and natural numbers, so you could take any natural number $k$, compute $(k+1)^2 - k^2 = 2k+1$, and check if $2k+1$ is prime; if it is, you will not generate the same prime from a different $k$.

However, I'm not sure what you've gained by doing this. It's equivalent to taking a list of odd natural numbers $1,3,5,7,9,\dots$, and checking each number on the list to see if it's prime.