Quant, Math & Computer Science Puzzles for Interview Preparation & Brain TeasingA collection of ~225 Puzzles with Solutions (classified by difficulty and topic)
The short and sweet answer is that 1000ᴺ-1 always has a higher power of three in its prime factorisation than does 1978ᴺ-1, so the former can never be a divisor of the latter.A longer version goes something like this:1000ᴺ-1 is a 3N-length string of 9s, so always has factors 9 and 111, and is thus always divisible by 27.1978ᴺ-1 is only divisible by 27 when N = 9n.However, when N = 9n, 1000ᴺ-1 is divisible by 243.1978ᴺ-1 is only divisible by 243 when N = 81n.But when N = 81n, 1000ᴺ-1 is divisible by 2187.And so on, and in general:3ʲ | 1978ᴺ-1 ⇒ N = 3ʲ⁻¹n ⇒ 3ʲ⁺² | 1000ᴺ-1To understand why N = 3ʲn ⇒ 3ʲ⁺³ | 1000ᴺ-1, consider how factors with digit sum 3 are pulled out as N increases:9 × 1119 × 111 × 10010019 × 111 × 1001001 × 1000000001000000001...As for 3ʲ | 1978ᴺ-1 ⇒ N = 3ʲ⁻¹n, I do not actually have an explicit proof but believe it can be proved from elementary results and half a cup of coffee.The straightforwardness seems plausible from the fact that Wolfram Alpha can calculate it so easily, even for biggish numbers and, at least at time of writing, has a bug for the case N = 1 that it gives no integer solutions to 1978ˣ (mod 3) = 1.
can we prove by using induction?
Consider 1978^N-1. For N=4i+1, one's digit is 7. For 4i+2, it is 3. 4i+3, it is 1. 4i, it is 5. And consider 1000^N-1 which has only either 8 or 0 in the one's place. They never match. Hence proved.
???? 1000^N-1 is of the form 999 or 999999 or 999999999 .... and not as you have described. Actually I also worked on those lines but the solution would not lie there.
Solution is there in in the link http://tech.groups.yahoo.com/group/mathforfun/message/10836 using group theory .
Clickable: http://tech.groups.yahoo.com/group/mathforfun/message/10836.Vivek: That link is spot on. Thanks. Everything is done "properly". My comment above has the right idea but the details are a bit dodgy, hehe.Litu: My instinct is that this is one of those problems where the Math you would need for the inductive step is the same that could be used for the general case more easily.Srikar: Firstly 1000ᴺ-1 always ends in 9, not "either 8 or 0". Secondly, if I understand you correctly then the premise of your proof is mistaken - a number can divide another number even if their final digits do not match.
Source: Sent to me by Gaurav Sinha Problem: Siddhant writes a Maths test and correctly answers 5 out of 6 Arithmetic questions and 20...