CMI sub-question

If a a is an element in the set { 2 , 3 , 4 , , 9999 } \{2,3,4,\ldots,9999\} , there are two values that a can take such that a 2 a a^2-a is divisible by 10000. Find the absolute difference between these two values.

As a bonus, can you find the number of such values of a a for a general set { 2 , 3 , , ( n 2 1 ) } \{2,3,\ldots,(n^2-1)\} , for any positive integer n n ?

Note that I do not know the answer to the bonus question. I made a mistake in the exam hall.


The answer is 8751.

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.

3 solutions

Patrick Corn
May 19, 2015

This is just an application of the Chinese Remainder Theorem. We have 2 4 5 4 a ( a 1 ) , 2^4 \cdot 5^4 | a(a-1), and since a a and a 1 a-1 are relatively prime, there are four cases: 2 4 2^4 and 5 4 5^4 divide a a , 2 4 2^4 and 5 4 5^4 divide a 1 a-1 , 2 4 a 2^4 | a and 5 4 a 1 5^4 | a-1 , and 2 4 a 1 2^4 | a-1 and 5 4 a 5^4 | a .

The first two cases give a 0 a \equiv 0 and a 1 a \equiv 1 mod 10000 10000 , so there are no solutions in the given set, and the second two cases give a 9376 a \equiv 9376 and a 625 a \equiv 625 respectively via the Chinese Remainder Theorem (e.g. a 0 a \equiv 0 mod 16 16 and a 1 a \equiv 1 mod 625 625 if and only if a 9376 a \equiv 9376 mod 10000 10000 ).

For a general n n the answer will depend on the number of primes dividing n n . If there are k k distinct primes dividing n n , there will be 2 k 2 2^k - 2 such values of a a (we subtract 2 because we are always excluding the solutions 0 0 and 1 1 ). The easiest way to see this is probably to ape the above argument in the case when n n is divisible by three primes, and see how many possibilities there are. One can write out a proof, but it would be more illuminating to play with a couple of examples to see why this statement is true.

In the exam, they asked to justify or prove (I can't remember which) that the function gives the number of such values of a in the general set. And they asked to represent it in terms of n. But that isn't possible, is it?

I don't know CRT, but I'm going to read up on that. Thank you for the solution!

vishnu c - 6 years ago

I tried to write a proof (technically it isn't much of a proof maybe) of your general result in the comments of OP's solution below (although I guess it isn't much rigorous). Would you be kind enough to verify it for me?

Prasun Biswas - 6 years ago
Chew-Seong Cheong
May 19, 2015

For 10000 ( a 2 a ) 2 4 5 4 [ a ( a 1 ) ] 10000|(a^2-a)\quad \Rightarrow 2^45^4|[a(a-1)] .

We note that a ( a 1 ) a(a-1) is a product of two consecutive integers, one odd and the other even. The smallest possible odd integer would be 5 4 = 625 5^4=625 , and we note that 2 4 ( 625 1 ) = 16 624 2^4|(625-1)=16|624 . Therefore, the first a 1 = 625 a_1 = 625 .

The following a a s must be around odd multiple of 625 625 . Since 624 0 ( m o d 16 ) 624 \equiv 0 \pmod{16} , a 2 a_2 is around 15 × 625 15\times 625 because 15 × 625 = 15 ( 624 + 1 ) 15 ( m o d 16 ) 15\times 625 = 15(624+1) \equiv 15 \pmod{16} a 2 = 15 ( 625 ) + 1 = 9376 \Rightarrow a_2 = 15(625)+ 1= 9376 .

a 2 a 1 = 9376 625 = 8751 \Rightarrow a_2-a_1 = 9376 - 625 = \boxed{8751}

We note that a 3 a_3 is around 17 ( 625 ) = 17 ( 624 + 1 ) 1 ( m o d 16 ) 17(625) = 17(624+1) \equiv 1 \pmod{16} a 3 = 17 ( 625 ) \Rightarrow a_3 = 17(625) .

Therefore,

a 1 = 1 × 625 a 2 = 15 × 625 + 1 a 3 = 17 × 625 a 4 = 31 × 625 + 1 a 5 = 33 × 625 . . . a k = { [ 16 ( k 1 ) + 1 ] × 625 if k is odd [ 16 ( k 1 ) + 1 ] × 625 + 1 if k is even \begin{array} {rl} a_1 = & 1 \times 625 \\ a_2 = & 15 \times 625 + 1 \\ a_3 = & 17 \times 625 \\ a_4 = & 31 \times 625 + 1 \\ a_5 = & 33 \times 625 \\ ... \end{array} \Rightarrow a_k = \begin{cases} [16(k-1)+1]\times 625 & \text{ if k is odd} \\ \\ [16(k-1)+1]\times 625 + 1 &\text{ if k is even} \end{cases}

Therefore, for n 9375 n \ge 9375 the number k k of such a a is given by:

k = n 625 16 + 1 k = \left \lceil \dfrac{\left \lfloor \dfrac {n}{625} \right \rfloor}{16} \right \rceil + 1

Is there such a formula for a general set {2,3,4... n 2 1 n^2-1 }?

vishnu c - 6 years ago

What's so special about numbers / a's greater than 10000? If you're going beyond the given set, even multiples of 625 or rather multiples of 16 and 625, i.e, 10000, should also be considered.

vishnu c - 6 years ago

Log in to reply

Yes, you are right. Let me look at it again. I am using other solution to solve this one. Sorry.

Chew-Seong Cheong - 6 years ago
Vishnu C
May 18, 2015

Here's how I did it:

Through some reasoning, you can arrive at the conclusion that a a has to end in either 5 or 6.

If a ends in 5, then a-1 ends in 4 and the factor of 16 lies entirely with a-1 and the factor of 625 lies entirely with a. And vice versa for the case when a ends in 6.

So we only need to hunt for odd multiples of 625. We find that 625 and 9376 are the two values of a by trial and error. So the difference is 8751.

There's an easier way to solve it and I know that. But this is how I did it in the exam hall. So please post a solution to this with the general case.

Well, this is a very nice coincidence. I answered this question just today about 6-7 hours ago on Math Stack Exchange. Didn't know that it was a CMI question though. It seems too easy to be a CMI question. Anyway, here 's the link to my answer there. Feel free to check it out, and maybe upvote it there too. :P

Prasun Biswas - 6 years ago

Log in to reply

Ya that guy also wrote the same test.

Do you know of any general method/formula for the bonus question set? I thought that because the formula would give a function of n through which the distribution of primes can be made out. Cause it would take value 0 whenever n is a prime.

vishnu c - 6 years ago

Log in to reply

The problem can be generalized by considering the unique prime factorization of n n but I can guarantee that it won't be pretty. One thing that can be observed is that the number of solutions probably increases with increase in prime factors of n n . I'm saying that using pure intuition and no written work, so I might be wrong.

Prasun Biswas - 6 years ago

Log in to reply

@Prasun Biswas What do you mean by number of solutions? Number of values of a? But should such a function of n exist, it will take the value 0 whenever n is a prime number, right? So won't you get a distribution of primes? If it's a polynomial, then it will have infinite real roots then.

vishnu c - 6 years ago

Log in to reply

@Vishnu C Yes, I'm talking about the number of values of a a . But my thinking consists no polynomials in it for this problem. I'm thinking of a purely number-theoretic approach. Although, I'm unsure whether this is correct or not.

Consider the unique prime factorization of n n , i.e., n = i = 1 q p i a i n=\displaystyle\prod_{i=1}^q p_i^{a_i} where p i p_i 's are primes and a i a_i 's are some positive integers corresponding to the value of n n . So, n n has q q primes in its U.P.F. Now, we would have,

a ( a 1 ) 0 ( m o d n ) a ( a 1 ) 0 ( m o d i = 1 q p i a i ) a(a-1)\equiv 0\pmod{n}\implies a(a-1)\equiv 0\pmod{\displaystyle\prod_{i=1}^q p_i^{a_i}}

Since a a and ( a 1 ) (a-1) are consecutive integers, they must be coprime (easily provable by Euclidean Algorithm). Our required modular congruences for solutions will be of the following form:

{ a 0 ( m o d x ) a 1 ( m o d y ) s.t. gcd ( x , y ) = 1 x y = n \begin{cases}a\equiv 0\pmod{x}\\ a\equiv 1\pmod{y}\end{cases}\quad\textrm{s.t. }\gcd(x,y)=1~\land~xy=n

This rules out the two separate congruence results a 0 ( m o d n ) a\equiv 0\pmod{n} and a 1 ( m o d n ) a\equiv 1\pmod{n} which don't give us solutions within given range { i } i = 2 i = ( n 1 ) \{i\}_{i=2}^{i=(n-1)} .

All the rest of the congruencies obviously gives us solutions and the number of the rest of congruences is simply the number of distinct products of primes possible (the primes being in the U.P.F of n n ) excluding the two results that we said doesn't give us solutions. So, our number of solutions are:

n = 1 q 1 ( q n ) = 2 q 2 = 2 ( 2 q 1 1 ) \sum_{n=1}^{q-1}\binom{q}{n}=2^q-2=2(2^{q-1}-1)

Hence, if n n has q q primes in its unique prime factorization, the number of values of a a that are possible solutions in the given set is 2 ( 2 q 1 1 ) 2(2^{q-1}-1) . Note that it is ensured that we aren't counting the same solution more than once since each congruence system possible gives a unique solution guaranteed by CRT.

EDIT: I just noticed Patrick Corn's solution. His general solution agrees with mine, so the answer must be correct.

Prasun Biswas - 6 years ago

Log in to reply

@Prasun Biswas Yes, the total number of congruences (including the two that lead to the "trivial" solutions) should be 2 q 2^q because each prime power is divisible by exactly one of a a and a 1 a-1 . There are q q prime powers and 2 2 choices for which one it divides. (Of course your explanation is correct too.)

Patrick Corn - 6 years ago

@Prasun Biswas Your solution is in terms of the number of prime factors of n and not in terms of n. The question in CMI's paper asked for a function of n that can do this number of a a counting.

vishnu c - 6 years ago

@Prasun Biswas I didn't understand most of your solution. But I'll come back to it as soon as I finish reading up on CRT.

Thanks for posting a solution!

vishnu c - 6 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...