Find 2 primes with the following property

73 Views Asked by At
Find 2 primes that are 1 more than a square number.  If this cannot be done, prove that it is impossible.

I have devised the equation:

x^2 + 1 = k, where k is a prime number

I have the solution: All prime numbers are odd, except 2. So, let's try 2.

When k = 2:

x^2 + 1 = 2
x^2 = 1
x = ±1, so 2 has this property

Rearranging the equation:

x^2 = k-1

As k is odd for all prime values other than 2, k-1 is even. The square root of an even number is an even number so x must be even. So, let's try out a few values of x:

When x=0:

0+1=k
k=1, which isn't prime

When x=2:

4+1=k
k=5, which is prime

Now we have found 2 primes that have this property.

I know I have technically solved the question, but I would like to know if there is a more elegant solution?

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

The question asked you to provide 2 examples, and you did! Your solution seems fine. As mentioned in the comments, there is not yet a general solution for all primes of the form $n^2+1$.