Why is 2017 an interesting number?

David Radcliffe
Mathematica Stories
5 min readDec 31, 2016

--

Some species of cicada emerge once every 17 years. It is believed that this long life cycle evolved in response to predators. Since 17 is a prime number, a predator with a shorter life cycle cannot reliably prey on the cicadas.

At the dawn of the new year 2017, let us reflect that 2017 is also a prime number. Perhaps we can take a lesson from the cicadas, and resolve this year to break out of our old destructive cycles.

In this article, I will discuss some of the interesting mathematical properties of the number 2017.

2017 is prime

The first property to note is that 2017 is a prime number. This means that 2017 is not divisible by any number except for 1 and itself. (At this point, I am obligated to mention that 1 is not considered to be prime.)

If a number N >1 is not prime, then one of its factors is less than or equal to the square root of N. So if we wish to prove that N is prime, it suffices to show that N is not divisible by any prime number up to the square root of N. For 2017, it suffices to check for divisibility by 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, and 43. We can stop at 43, because the next prime 47 is greater than the square root of 2017.

Here is a short Python script to check if a number is prime. Keep in mind that this is not an efficient method for large numbers, but it works fine for small numbers like 2017.

Curiously, 2017π and 2017e both yield prime numbers when rounded to the nearest integer. 2017π ≈ 6337 and 2017e ≈ 5483.

2017 is a sum of two squares

Since 2017 is a prime number of the form 4k+1, it can be written uniquely as the sum of two squares, by Fermat’s Theorem on sums of two squares. In this case we have 2017 = 44² +9².

We can factor 2017 in the Gaussian integers as (44+9i)(44–9i). A Gaussian integer is a complex number of the form a + bi, where a and b are integers, and i is the imaginary unit. This shows that the property of being prime depends on the number system, not just the number. 2017 is prime in the ordinary integers, but it is not prime in the Gaussian integers.

Since 9 is a square, we can write 2017 as the sum of a square and a fourth power: 2017 = 44² + 3⁴. Primes of this form are known as Friedlander-Iwaniec primes, because Friedlander and Iwaniec proved in 1997 that there are infinitely many primes of this form.

We can also write 2017 as the sum of three cubes: 2017 = 11³+7³+7³. Heath-Brown proved in 2001 that there are infinitely many primes of the form x³+2y³.

2017 is a lazy caterer number

Source: https://commons.wikimedia.org/wiki/File%3APancakeCutThrice.agr.jpg

This picture shows a pancake that has been divided into 7 pieces by 3 straight cuts. How many pieces can be made using N straight cuts?

This question can be answered by counting the number of additional pieces created by each cut. In the beginning, there is only 1 piece. The first cut adds 1 piece, the second cut adds 2 pieces, the third cut adds 3 pieces, and so on. So after 3 cuts, there are 1 + 1 + 2 + 3 = 7 pieces.

But what if we wanted 2017 pieces? It turns out that we can cut a pancake into 2017 pieces with exactly 63 cuts:

1 + 1 + 2 + 3 + 4 + 5 + … + 63 = 2017

The numbers 1, 2, 4, 7, 11 representing the number of pieces after N cuts is known as the lazy caterer’s sequence. 2017 is the 63rd lazy caterer’s number.

An odd-number spiral

Arrange the odd numbers in a square spiral, as shown below. If you start at the 1 in the center and move down 16 cells then you will land on the number 2017. Neat, huh? (How this is related to the lazy caterer’s sequence?)

A square spiral of odd numbers

Here is another question related to arranging numbers in a grid. Suppose that we want to arrange the numbers 1–16 in a 4×4 grid so that the numbers are increasing along each row, each column, and both diagonals. Would you believe that there are 2017 ways to accomplish this? [Source]

Pattern-avoiding permutations

There are 5040 ways to arrange the numbers 1–7. To see this, note that there are 7 choices for the first number, 6 choices for the second number, 5 choices for the third number, and so on. Multiplying the number of choices at each stage, we get 7×6×5×4×3×2×1 = 5040. Mathematicians use the word permutation to refer to arrangement of the numbers 1 through N.

A permutation is said to contain the pattern 123 if it contains three consecutive digits in ascending order. For example, the permutation 351462 contains the pattern 123 because 1 < 4 < 6, but 351642 does not contain this pattern.

Mathematicians are very interested in counting permutations that avoid various patterns. It turns out that there are 2017 permutations of 1–7 that avoid the pattern 123.

Some additional properties of 2017

  1. 2017 is also prime when interpreted in base 8.
  2. (2017+1)/2 and (2017+2)/3 are prime.
  3. There are 2017 solutions to |w-x| = |x-y| in integers between 0 and 36.
  4. 2017 is a palindrome in base 31 (232) and base 32 (1V1), and it is the smallest number that is a palindrome in both bases.
  5. 2017 = (10×9×8×7×6) / (5+4+3×2) + 1. [Source]
  6. There are 2017 horizontally convex polyominoes with 8 cells. [Source]
  7. 2017 remains prime when 7 is inserted anywhere (27017, 20717, 20177).
  8. The sum of all odd primes up to 2017 is also prime.
  9. The set {1, 2, …, 25} has 2017 three-element subsets with no common factor.
  10. There are 2017 seventh powers which have 27 digits.

--

--

David Radcliffe
Mathematica Stories

I am an independent software developer and former college math instructor. Still trying to find the answers to life's persistent questions.