New Batches at TathaGat Delhi & Noida!               Directions to CP centre
Re: 123123....300 digits which div by 99 .. remainder is ??
by TG Team - Thursday, 4 September 2014, 01:08 PM
  Hi Bibs smile

In earlier case we were grouping the number in 2-digit numbers from right so that each group i.e. a 2-digit number was multiple of some power of 100 (i.e. 102) and the groups were alternate +/- with first group from right most side being positive one.

Try to understand the reason on a small 4-digit number only.

Say our number is N = abcd = ab*102 + cd

Now we know that 102 when divided by 101 (i.e. 102 + 1) gives remainder -1.
So N = {ab(-1) + cd} mod 101 = {ab - cd} mod 101

If you had another group of 2-digits before ab, then that'd have been multiple of 104 which can be written as 102*102 = (-1)(-1) mod 101 = 1 mod 101. So that group would have been positive. Hence the alternate +/- pattern comes in picture here.

Now to enlarge the concept for this question, you can easily observe that in given number the pattern of digits repeat after every 7 digits. So if I consider group of 14 digits collectively, then each group would be multiple of powers of 1014..i.e.

N = 1243768
1243768*(1014)49 + 12437681243768*(1014)48 + 12437681243768*(1014)47 + ... + 12437681243768*(1014)1 + 12437681243768

Now just observe that as 102 = -1 mod 101, so 1014 = (102)7 = (-1)7 mod 101 = -1 mod 101.

Thus again we are going to get alternate +/- groups of these 14 digits, while dividing with 101, with first group from right most side being positive.

As we have exactly 50 groups of 14 digits each here and half of which are positive and half negative. Thus required remainder is simply zero as all the groups will be cancelled. smile

Kamal Lohia