# Hello 2017

Standard

2017 is a prime number!! In fact this is 306th prime year A. D. The previous prime year was 2011 and next one will be 2027.

Moreover, 2017 leaves a remainder of 1 when divided by 4. So, this can be represented as sum of two squares. How do we know?

Fermat’s two-square theorem: An odd prime $p$ can be written as sum of two squares if and only if it is can be written as $4n+1$ for some integer $n$. Moreover, this representation is unique.

Unlike the three-square theorem discussed in previous post, this is not that difficult to prove (the only challenging part is to show that if the prime leaves a remainder 1 when divided by 4 then it “can” be written as sum of two squares). There are many ways to prove this, and there is a Wikipedia page dedicated to the popular proofs of it.  But my favorite proof is the one by Richard Dedekind, it requires knowledge of Gaussian integers and some College algebra (properties of unique factorization domain). You can find “existence” proof here and “uniqueness” proof here.

I will end this post with writing step-by-step procedure of writing 2017 as sum of two squares by following the algorithm explained here:

Step 1: Find $z$ such that $z^2+1$ is divisible by 2017.

Choose any quadratic non-residue $a$ modulo 2017 because then $a^{1008} +1$ is divisible by 2017. Since half of the residues modulo 2017 are quadratic non-residue, it’s easy to check our guess using $a^{1008} +1$ divisibility. Easy to observe that $a=5$ is smallest solution (in fact here is the list of quadratic non-residues modulo 2017 generated by WolframAlpha). Hence $z\equiv 5^{504} \pmod{2017}$, we get $z=229$.

Step 2: Compute the greatest common divisor of 2017 and $229+i$ using the Euclidean algorithm for the Gaussian integers. The answer will be $x+yi$ where $x^2+y^2=2017$.

Note that norm of any Gaussian integer $r+si$ is $r^2+s^2$. Hence, the norm of 229+i, N(229+i) = 52442. For euclidean algorithm I will use long division/calculator as:

For Gaussian integers we first multiply the denominator by its conjugate and then use calculator to compute real and imaginary parts of the quotient separately.

2017 = (229+i)(8) +(185-8i) ;   N(185-8i) = 34289

229 + i = (185-8i)(1) + (44+9i);   N(44+9i) = 2017

185-8i = (44+9i)(4-i) + 0

Hence, the gcd is 44+9i.

Finally, we get: $44^2 + 9^2 = 2017$.

You may find this property of 2017 not so special, since there are infinitely many primes of form $4n+1$. Please let me know more interesting properties of this number…

### 10 responses

1. Pingback: Sum of squares | Gaurish4Math

2. Yes, this masterpiece of Prof Joseph Silverman is indeed “friendly”…in fact, it can be used by high school kids also. …And, if they pick it up well…they might even take up number theory or related branches of math as a career. I have been using that book to “entice” students of high school towards number theory/Math of RMO (of Homibhabha, TIFR of India)…My coaching experience as well as my own re-learning of number theory has been a pleasure with this reference of J. Silverman.

Liked by 1 person

• It’s beautiful. Can you post an example of using this for 2017?

Like

• I put the Riff for 2017 in this table and will do the Rote for 2017 tomorrow.

Like

• Oops, that page may have to be reviewed by an editor before it shows up externally.
Try this one.

Liked by 1 person

• It’s nice! Thanks 🙂

Like

• Here is the recursive factorization pattern —

$2017 = p_{306} = p_{2 \cdot 9 \cdot 17} = p_{p_1^1 p_2^2 p_7^1} = p_{p_1^1 p_2^2 p_{p_4^1}^1} = p_{p_1^1 p_2^2 p_{p_{p_1^2}^1}^1} = p_{p p_p^p p_{p_{p^p}}}$

And there are pictures of the Riff and Rote in this table.

Like