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 can be written as sum of two squares if and only if it is can be written as for some integer . 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 such that is divisible by 2017.*

Choose any quadratic non-residue modulo 2017 because then is divisible by 2017. Since half of the residues modulo 2017 are quadratic non-residue, it’s easy to check our guess using divisibility. Easy to observe that is smallest solution (in fact here is the list of quadratic non-residues modulo 2017 generated by WolframAlpha). Hence , we get .

**Step 2:** *Compute the greatest common divisor of 2017 and using the Euclidean algorithm for the Gaussian integers. The answer will be where .*

Note that norm of any Gaussian integer is . 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: .

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

### Like this:

Like Loading...

*Related*

Pingback: Division algorithm for reals | Gaurish4Math

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.

LikeLiked by 1 person

Fun With Primes ☞ Riffs & Rotes

LikeLike

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

LikeLike

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

LikeLike

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

Try this one.

LikeLiked by 1 person

It’s nice! Thanks 🙂

LikeLike

Here is the recursive factorization pattern —

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

LikeLike

Thanks!

LikeLike