Ball Game v2

Yolanda and Zachary are sitting at a round table with a number of other people (possibly 0). They play a game in which they pass a ball around the table, always to the person to the left. The ball starts with Yolanda, and after 2017 passes, Zachary has the ball. After k k additional passes, where k k is some positive integer, Yolanda has the ball again.

For how many integers k k between 1 and 2017 inclusive is it possible that Yolanda and Zachary are sitting next to each other?


Inspiration.


The answer is 1441.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Steven Yuan
Jun 22, 2017

Let n n be the number of people sitting at the table. Note that n 2. n \geq 2. Starting from Yolanda and going clockwise, we label each person with the numbers 0 , 1 , 2 , , n 1 , 0, 1, 2, \dots, n-1, so that after p p passes, the person with the number p ( m o d n ) p \! \pmod{n} has the ball.

From the problem statement, we know that k + 2017 0 ( m o d n ) , k + 2017 \equiv 0 \! \pmod{n}, since Yolanda ends up with the ball after k + 2017 k + 2017 passes. Assuming that Zachary is sitting next to Yolanda, we also have 2017 ± 1 ( m o d n ) , 2017 \equiv \pm 1 \! \pmod{n}, since the numbers next to Yolanda are 1 and n 1 1 ( m o d n ) . n - 1 \equiv -1 \! \pmod{n}.

In order for this system of congruences to have a solution n 2 , n \geq 2, we see that we must have gcd ( k + 2017 , 2017 ± 1 ) > 1 , \gcd(k + 2017, 2017 \pm 1) > 1, since otherwise the only possible value for n n would be 1, which is not possible. This gives us two cases:


Case 1: gcd ( k + 2017 , 2016 ) > 1 \gcd(k + 2017, 2016) > 1

By the Euclidean algorithm, this can be simplified into gcd ( k + 1 , 2016 ) > 1. \gcd(k + 1, 2016) > 1. First, notice that k = 2017 k = 2017 is a solution to this inequality. To easily count the number of solutions from 1 to 2016 inclusive, we count the number of solutions to gcd ( k + 1 , 2016 ) = 1 , \gcd(k + 1, 2016) = 1, where 1 k 2016 , 1 \leq k \leq 2016, and subtract by 2016.

By the definition of Euler's totient function, the number of solutions to gcd ( k + 1 , 2016 ) = 1 , \gcd(k + 1, 2016) = 1, where 0 k 2015 , 0 \leq k \leq 2015, is ϕ ( 2016 ) = 576. \phi(2016) = 576. So, there are 2016 576 = 1440 2016 - 576 = 1440 solutions to gcd ( k + 1 , 2016 ) > 1 \gcd(k + 1, 2016) > 1 in that interval. Since k = 0 k = 0 and k = 2016 k = 2016 are not solutions to this inequality, there are still 1440 1440 solutions the inequality for 1 k 2016. 1 \leq k \leq 2016.

Combining this with the solution k = 2017 , k = 2017, we find that there are 1441 1441 solutions to gcd ( k + 2017 , 2016 ) > 1 , \gcd(k + 2017, 2016) > 1, where 1 k 2017. 1 \leq k \leq 2017.

Case 2: gcd ( k + 2017 , 2018 ) > 1 \gcd(k + 2017, 2018) > 1

We approach this case similar to the previous case. First, note that k = 1 k = 1 is a solution. Then, for k > 1 , k > 1, the Euclidean algorithm tells us that the inequality is equivalent to gcd ( k 1 , 2018 ) > 1. \gcd(k - 1, 2018) > 1.

There are ϕ ( 2018 ) = 1008 \phi(2018) = 1008 solutions to gcd ( k 1 , 2018 ) = 1 , \gcd(k - 1, 2018) = 1, where 2 k 2019. 2 \leq k \leq 2019. So, there are 2018 1008 = 1010 2018 - 1008 = 1010 solutions to gcd ( k 1 , 2018 ) > 1 \gcd(k - 1, 2018) > 1 in that interval. Since k = 2019 k = 2019 is a solution to the inequality, but k = 2018 k = 2018 is not, there are 1009 1009 solutions to the inequality for 2 k 2017. 2 \leq k \leq 2017.

Combining this with the solution k = 1 , k = 1, we find that there are 1010 1010 solutions to gcd ( k + 2017 , 2018 ) > 1. \gcd(k + 2017, 2018) > 1. where 1 k 2017. 1 \leq k \leq 2017.


Now, we must subtract the number of overcounted solutions in both cases. First, we count jthe number of k k from 1 to 2017 inclusive such that k + 1 k + 1 is even i.e. k k is odd. There are 1009 1009 odd numbers from 1 to 2017 inclusive. We must also include k = 1010 , k = 1010, since gcd ( 3027 , 2016 ) = 3 \gcd(3027, 2016) = 3 and gcd ( 3027 , 2018 ) = 1009. \gcd(3027, 2018) = 1009. Thus, there are 1010 1010 overcounted solutions in both cases.

Finally, the total number of k k from 1 to 2017 inclusive such that it is possible for Yolanda and Zachary to be sitting next to each other is 1441 + 1010 1010 = 1441 . 1441 + 1010 - 1010 = \boxed{1441}.

There is actually one more number that satisfies both cases, which is k = 1010 k = 1010 : gcd ( 1010 + 2017 , 2016 ) = gcd ( 3027 , 2016 ) = 3 , \gcd(1010 + 2017,2016) = \gcd(3027,2016) = 3, and gcd ( 1010 + 2017 , 2018 ) = gcd ( 3027 , 2018 ) = 1009. \gcd(1010 + 2017,2018) = \gcd(3027,2018) = 1009. This means the answer is 1441 + 1010 1010 = 1441 1441 + 1010 - 1010 = 1441 .

Jon Haussmann - 3 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...