$2017$ as the sum of two squares

3.5k Views Asked by At

Write the prime $2017$ as the sum of two squares

$2017$ can be written as the sum of two squares because it is a prime of the form $p\equiv 1\ ($mod $4)$

Using an appropriate algorithm find the two numbers that, when squared, add to the total of $2017$

3

There are 3 best solutions below

1
On BEST ANSWER

Possible last digits of any square number :$$0,1,4,5,6,9$$ Possible combinations that can give perfect squares which end in $7$ are:$$(1,6)$$ Find the numbers whose squares are ending with $1,6$ and less than $2017$.

List of such numbers whose squares end in $1$ are : $1,9,11,19,21,29,31,39,41$. Check if any of the squares of these numbers when subtracted from $2017$, gives you a perfect square. $$2017 - 1^2 = 2017 - 1 = 2016$$ $$2017 - 9^2 = 2017 - 81 = 1936 = 44^2$$ $$2017 - 11^2 = 2017 - 121 = 1896$$ $$....$$ $$2017 - 41^2 = 2017 - 1681 = 336$$

Find all the possible pairs, one such pair being $(9,44)$.After going through all the above mentioned cases, you can eventually conclude that $(9,44)$ is the only pair which satisfies the given condition.

0
On

This wouldn't be too difficult to figure out. Write a list of all squares less than 2017. Then for each square on the list $n^2$ see if $2017 - n^2$ is also on the list. 2017 is small enough that this "algorithm" should work pretty fast.

0
On

Hint The quadratic residues $\pmod{9}$ are $0,1,4,7$. There is only one way to write $1 \pmod{9}$ as the sum of two quadratic residues.