Arithmetic Progression modulo 2018 2018

2017 , 2018 , 2019 , 2020 , 2017,\ 2018,\ 2019,\ 2020,\ \ldots If a i a_i is a term in the above arithmetic progression , then every non-negative integer from 0 0 to 2017 2017 (inclusive) is a possible remainder of a i a_i when divided by 2018. 2018.

Now, let b i b_i be any term in the following arithmetic progression: 2017 , 2017 + n , 2017 + 2 n , 2017 + 3 n , . 2017,\ 2017+n,\ 2017+2n,\ 2017+3n,\ \ldots. Find the number of positive integers n 2018 n \leq 2018 such that every non-negative integer from 0 0 to 2017 2017 (inclusive) is a possible remainder of b i b_i when divided by 2018 2018 .


Bonus :

  • Generalize the problem by generalizing the value of the initial term (2017) of the sequence and/or of the divisor (2018).
  • How do this problem and its geometric progression equivalent differ in difficulty level?


The answer is 1008.

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.

2 solutions

Let's consider the generalized version of the problem, replacing 2017 2017 , the first term of AP, with b 1 b_1 and 2018 2018 , the divisor, with M M ; and let me show that─

Let b i b_i denote i i -th term of the AP: b 1 , b 1 + n , b 1 + 2 n , b_1, b_1+n, b_1+2n, \ldots \ldots \ldots . Every non-negative integers from 0 0 to ( M 1 ) (M-1) is a possible remainder of b i b_i when divided by M M if and only if M M and n n are coprime to each other. ( b 1 , n , M b_1, n, M are integers).


Proof :

  • Let b p b_p and b q b_q be two different terms of the AP, such that they give same remainders when divided by M M . So, ( b p b q ) (b_p-b_q) is divisible by M M .
  • b p = b 1 + ( p 1 ) n b_p=b_1+(p-1)n and b q = b 1 + ( q 1 ) n b_q=b_1+(q-1)n .
  • b p b q = ( p q ) n b_p-b_q=(p-q)n .
  • As ( b p b q ) (b_p-b_q) is divisible by M M . ( p q ) n (p-q)n is divisible by M M .
  • Now, if n n and M M are coprime, then p q p-q have to be divisible by M M . So, each of any consecutive M M terms of the AP will have remainder different from other ( M 1 ) (M-1) terms So, every non-negative integers from 0 0 to ( M 1 ) (M-1) will occur as remainders. That proves the if part.
  • I don't like typing much and I believe, at this point anyone can prove the only if part.

So, to solve the problem, we have to find number of positive integers n 2018 n\leq 2018 such that n n and 2018 2018 are coprime. Yes, we need ϕ ( 2018 ) \phi (2018) , when ϕ ( ) \phi () is the Euler's Totient Function .

Hence the answer is ϕ ( 2018 ) = ϕ ( 2 × 1009 ) = ϕ ( 2 ) × ϕ ( 1009 ) = 1 × 1008 = 1008 \phi (2018) = \phi(2 \times 1009) = \phi(2) \times \phi(1009) = 1 \times 1008 = \boxed{1008} .

Oliver Papillo
Jan 2, 2018

Relevant wiki: Euler's Totient Function

The possible remainders of b i b_{i} are each respectively congruent to k g c d ( n , 2018 ) + 2017 ( m o d 2018 ) k * gcd(n, 2018) + 2017 (mod \ 2018) , for some k Z k \in \mathbb{Z} .

From this, it can be seen that g c d ( n , 2018 ) = 1 gcd(n, 2018) = 1 if the conditions are to be met.

So the number of different values for n n is φ ( 2018 ) φ(2018) , where φ ( n ) φ(n) is Euler's Totient (phi) Function.

As φ ( m n ) = φ ( m ) φ ( n ) φ(mn)=φ(m)φ(n) where g c d ( m , n ) = 1 gcd(m,n) = 1 ;

And g c d ( 2 , 1009 ) = 1 gcd(2,1009) = 1 ;

And φ ( p ) = p 1 φ(p) = p - 1 when p p is prime;

φ ( 2018 ) = φ ( 2 ) φ ( 1009 ) = 1 1008 = 1008 φ(2018) = φ(2)φ(1009) = 1 * 1008 = 1008

Generalisation: For an initial term a a and a divisor b b , the number of different values for n n is always φ ( b ) φ(b) , irrespective of a a .

Small typo. k belongs to I and not R.

Dr. High Einstien - 3 years, 4 months ago

Log in to reply

Thanks for That, it has been Changed

Oliver Papillo - 3 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...