Power n divisible by n powers

If S S is the sum of all possible positive integers n n such that 1 0 n n 3 + n 2 + n + 1 \dfrac {10^n} {n^3+n^2+n+1} is an integer, what is the remainder when S S is divided by 10?

Happy Valentine's Day & Chinese New Year Everyone!


The answer is 0.

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

Warning: Gigantic solution ahead.

Well, in order for us to have n 3 + n 2 + n + 1 1 0 n n^{3} + n^{2} + n + 1|10^{n} , n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 must be of the form 2 a 5 b 2^{a}5^{b} , a a and b b being non-negative integers.

Let's consider two main cases:

Case I I : a = 0 a = 0 , b = 0 b = 0

This gives us: n 3 + n 2 + n + 1 = 1 n^{3} + n^{2} + n + 1 = 1 , or n 3 + n 2 + n = 0 n^{3} + n^{2} + n = 0 ; the only real solution for this equation is n = 0, which doesn't suit our purposes.

Case I I II : At least one of a , b a, b is different from 0.

Now, we must consider a few subcases for the values of n n itself. Notice that, for all a > 0 a > 0 , the values of x x such that 2 a x ( m o d 10 ) 2^{a} \equiv x \pmod{10} cycle through the set 2 , 4 , 8 , 6 2, 4, 8, 6 in this particular order; also, for all b > 0 b > 0 , 5 b 5 ( m o d 10 ) 5^{b} \equiv 5 \pmod{10} .

Further observation tells us that 2 a 5 b 0 ( m o d 10 ) 2^{a}5^{b} \equiv 0 \pmod{10} when both a a and b b are greater than 0 at the same time, and thus 2 a 5 b 2^{a}5^{b} can only be non-congruent to 0 ( m o d 10 ) 0 \pmod{10} iff one of them is 0 0 ; thus, the set of possible congruences modulo 10 10 for n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 is ( 0 , 2 , 4 , 5 , 6 , 8 ) (0, 2, 4, 5, 6, 8) .

Then, let's observe what happens to n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 when we cycle for all possible values of z z such that 0 z 9 0 \leq z \leq 9 and n z ( m o d 10 ) n \equiv z \pmod{10} .

n 0 ( m o d 10 ) n 3 + n 2 + n + 1 1 ( m o d 10 ) n \equiv 0 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 1 \pmod{10}

n 1 ( m o d 10 ) n 3 + n 2 + n + 1 4 ( m o d 10 ) n \equiv 1 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 4 \pmod{10}

n 2 ( m o d 10 ) n 3 + n 2 + n + 1 5 ( m o d 10 ) n \equiv 2 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 5 \pmod{10}

n 3 ( m o d 10 ) n 3 + n 2 + n + 1 0 ( m o d 10 ) n \equiv 3 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 0 \pmod{10}

n 4 ( m o d 10 ) n 3 + n 2 + n + 1 5 ( m o d 10 ) n \equiv 4 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 5 \pmod{10}

n 5 ( m o d 10 ) n 3 + n 2 + n + 1 6 ( m o d 10 ) n \equiv 5 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 6 \pmod{10}

n 6 ( m o d 10 ) n 3 + n 2 + n + 1 9 ( m o d 10 ) n \equiv 6 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 9 \pmod{10}

n 7 ( m o d 10 ) n 3 + n 2 + n + 1 0 ( m o d 10 ) n \equiv 7 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 0 \pmod{10}

n 8 ( m o d 10 ) n 3 + n 2 + n + 1 5 ( m o d 10 ) n \equiv 8 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 5 \pmod{10}

n 9 ( m o d 10 ) n 3 + n 2 + n + 1 0 ( m o d 10 ) n \equiv 9 \pmod{10} \rightarrow n^{3} + n^{2} + n + 1 \equiv 0 \pmod{10}

From this we derive that n n cannot be congruent to either 0 0 or 6 6 when divided by 10 10 ; this is the same as stating that the last digit of n cannot be 0 0 or 6 6 . Also, we can narrow the set of possible congruences modulo 10 10 for n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 down to ( 0 , 4 , 5 , 6 ) (0, 4, 5, 6) .

The first case work is done; we move into a new case analysis.

Case 1 1 : n 3 + n 2 + n + 1 4 ( m o d 10 ) n^{3} + n^{2} + n + 1 \equiv 4 \pmod{10}

What this means is that n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 is a number of the form 2 a 2^{a} such that a 2 ( m o d 4 ) a \equiv 2 \pmod{4} .

Thus, we have: ( n + 1 ) ( n 2 + 1 ) = 2 a (n + 1)(n^{2} + 1) = 2^{a} . We've ruled out the possibility n = 1 n = 1 back at case I I ; besides, we must have:

{ n + 1 = 2 a 1 n 2 + 1 = 2 a 2 \begin{cases} n + 1 = 2^{a_{1}} \\ n^{2} + 1 = 2^{a_{2}} \end{cases}

Since n 2 + 1 n^{2} + 1 is a power of two, as well as n + 1 n + 1 , and since n 2 + 1 > n + 1 n^{2} + 1 > n + 1 for all n > 1 n > 1 , then n + 1 n 2 + 1 n + 1|n^2 + 1 .

Performing the polynomial division yields: n 2 + 1 = ( n + 1 ) ( n 1 ) + 2 n^{2} + 1 = (n + 1)*(n - 1) + 2 ; thus, n + 1 n + 1 must divide 2 so that n + 1 n 2 + 1 n + 1|n^2 + 1 . This could only happen if either n = 0 n = 0 or n = 1 n = 1 ; both possibilities have been ruled out, and thus no numbers fit this case.

Case 2 2 : n 3 + n 2 + n + 1 6 ( m o d 10 ) n^{3} + n^{2} + n + 1 \equiv 6 \pmod{10}

Like the previous case, n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 is a number of the form 2 a 2^{a} such that a 0 ( m o d 4 ) a \equiv 0 \pmod{4} . By reasoning similar to the previous case, we'd arrive at the same result, which is that no numbers fit this case.

Case 3 3 : n 3 + n 2 + n + 1 5 ( m o d 10 ) n^{3} + n^{2} + n + 1 \equiv 5 \pmod{10}

This time, n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 is a number of the form 5 b 5^{b} ; however, by reasonings similar to the previous cases, we'd arrive once more at the same result.

Case 4 4 : n 3 + n 2 + n + 1 0 ( m o d 10 ) n^{3} + n^{2} + n + 1 \equiv 0 \pmod{10}

Finally, the last case. Not only this means that n 3 + n 2 + n + 1 n^{3} + n^{2} + n + 1 is a number of the form 2 a 5 b 2^{a}5^{b} , but also that either n 3 ( m o d 10 ) n \equiv 3 \pmod{10} , n 7 ( m o d 10 ) n \equiv 7 \pmod{10} , or n 9 ( m o d 10 ) n \equiv 9 \pmod{10} .

( n + 1 ) ( n 2 + 1 ) = 2 a 5 b (n + 1)*(n^2 + 1) = 2^{a}5^{b}

Subcase 4.1 4.1 : n 3 ( m o d 10 ) n \equiv 3 \pmod{10}

This means that n + 1 4 ( m o d 10 ) n + 1 \equiv 4 \pmod{10} , and n 2 + 1 0 ( m o d 10 ) n^2 + 1 \equiv 0 \pmod{10} ; thus, n + 1 n + 1 is a power of two and n 2 + 1 n^2 + 1 is the product of a power of two by 5 b 5^{b} .

{ n + 1 = 2 a 1 n 2 + 1 = 2 a 2 5 b \begin{cases} n + 1 = 2^{a_{1}} \\ n^{2} + 1 = 2^{a_{2}}5^{b} \end{cases}

Thus: ( 2 a 1 1 ) 2 + 1 = 2 a 2 5 b (2^{a_{1}} - 1)^{2} + 1 = 2^{a_{2}}5^{b}

2 2 a 1 2 a 1 + 1 + 2 = 2 a 2 5 b 2^{2a_{1}} - 2^{a_{1} + 1} + 2 = 2^{a_{2}}5^{b}

2 ( 2 2 a 1 1 2 a 1 + 1 ) = 2 a 2 5 b 2*(2^{2a_{1} - 1} - 2^{a_{1}} + 1) = 2^{a_{2}}5^{b}

Since a 1 > 1 a_{1} > 1 (Otherwise we'd have n = 0 n = 0 or n = 1 n = 1 ), we can write:

{ 2 a 2 = 2 2 2 a 1 1 2 a 1 + 1 = 5 b \begin{cases} 2^{a_{2}} = 2 \\ 2^{2a_{1} - 1} - 2^{a_{1}} + 1 = 5^{b} \end{cases}

Thus, a 2 = 1 a_{2} = 1 . As for the other equation, let 2 a 1 = x 2^{a_{1}} = x and 5 b = y 5^b = y .

We have: x 2 2 x + 1 = y x 2 2 x + 2 ( 1 y ) = 0 \frac{x^{2}}{2} - x + 1 = y \rightarrow x^{2} - 2x + 2(1 - y) = 0 .

Solving for x x : x = 1 ± 2 y 1 x = 1 \pm \sqrt{2y -1}

Now, 2 y 1 2y - 1 must be a square number; this means 2 5 b 1 = z 2 2*5^{b} - 1 = z^{2}

The only non-negative integer solutions ( b , z ) (b, z) for this equation are: ( 0 , 1 ) (0, 1) , ( 1 , 3 ) (1, 3) and ( 2 , 7 ) (2, 7) . To see why this holds, let's examine this lemma:

Lemma I I : The only pairs ( b , z ) (b, z) of integer solutions for 2 5 b 1 = z 2 2*5^{b} - 1 = z^{2} are ( 0 , 1 ) (0, 1) , ( 1 , 3 ) (1, 3) and ( 2 , 7 ) (2, 7) .

To prove this, first note that, since 5 b 5^{b} is odd for all integers b b , then so is 2 5 b 1 2*5^{b} - 1 . This implies that z 2 z^{2} is odd, which means that z z must be odd as well. Now, if there are two solutions ( b 1 , z 1 ) (b_{1}, z_{1}) and ( b 2 , z 2 ) (b_{2}, z_{2}) , with b 1 b 2 b_{1} \neq b_{2} (which imply in z 1 z 2 z_{1} \neq z_{2} due to the fact that the exponential function is injective), then the difference between z 1 z_{1} and z 2 z_{2} is even; in other words, z 2 z 1 = 2 p z_{2} - z_{1} = 2p .

Now, notice that for z = 5 z = 5 , there are no solutions for b b . Now, I'll prove that if any odd value of z > 7 z > 7 is not a solution, then neither z + 4 z + 4 can produce a solution; this will eventually assure that we'll cover all of the odd integers.

Firstly, let's assume that there is a value z 1 > 7 z_{1} > 7 such that there is a corresponding b 1 b_{1} , and also that there is a second value, z 2 z_{2} , such that z 2 = z 1 + 4 z_{2} = z_{1} + 4 and there is a value b 2 b_{2} ;

Thus:

{ 2 5 b 1 1 = z 1 2 2 5 b 2 1 = z 2 2 \begin{cases} 2*5^{b_{1}} - 1 = z_{1}^{2} \\ 2*5^{b_{2}} - 1 = z_{2}^{2} \end{cases}

Now, subtracting the first equation from the second, and using the fact that z 2 = z 1 + 4 z_{2} = z_{1} + 4 , we have:

2 ( 5 b 2 5 b 1 ) = 8 ( z 1 + 2 ) 2*(5^{b_{2}} - 5^{b_{1}}) = 8*(z_{1} + 2)

5 b 1 ( 5 b 2 b 1 1 ) = 4 ( z 1 + 2 ) 5^{b_{1}}*(5^{b_{2} - b_{1}} - 1) = 4*(z_{1} + 2)

Now, since z 1 z_{1} is odd, so is z 1 + 2 z_{1} + 2 ; also, on the LHS the only odd factor is 5 b 1 5^{b_{1}} ; then, we can conclude that 5 b 1 = z 1 + 2 5^{b_{1}} = z_{1} + 2 .

What this means is that: 2 ( z 1 + 2 ) 1 = z 1 2 2*(z_{1} + 2) - 1 = z_{1}^{2} ; from here:

z 1 2 2 z 1 3 = 0 z_{1}^{2} - 2z_{1} - 3 = 0 .

The only positive solution for z 1 z_{1} is z 1 = 3 z_{1} = 3 ; however, this contradicts our earlier assumption that z 1 > 7 z_{1} > 7 ; thus, by contradiction, if z 1 z_{1} is not a solution of the equation, neither z 1 + 4 z_{1} + 4 will be. Note that z = 9 z = 9 does not produce a solution (we'd have 5 b = 41 5^{b} = 41 ), and neither does z = 11 z = 11 (we'd have 5 b = 60 5^{b} = 60 ). Then, we get all of the odd integers covered, meaning that our lemma is valid; thus, the only solution is given by b = 1 b = 1 and z = 3 z = 3 ( b = 0 b = 0 produces the solution n = 1 n = 1 , which is not valid, and b = 2 b = 2 produces the only solution for the next subcase, as you will see).

Finally, verifying that n = 3 n = 3 gives us a solution: 1 0 3 3 3 + 3 2 + 3 + 1 = 1000 40 = 25 \frac{10^{3}}{3^{3} + 3^{2} + 3 + 1} = \frac{1000}{40} = 25 .

Subcase 4.2 4.2 : n 7 ( m o d 10 ) n \equiv 7 \pmod{10}

This means that n + 1 8 ( m o d 10 ) n + 1 \equiv 8 \pmod{10} , and n 2 + 1 0 ( m o d 10 ) n^2 + 1 \equiv 0 \pmod{10} ; thus, n + 1 n + 1 is a power of two and n 2 + 1 n^2 + 1 is the product of a power of two by 5 b 5^{b} .

By the reasoning shown in the previous subcase, we arrive at the fact that the only solution is n = 7 n = 7 ; verifying: 1 0 7 7 3 + 7 2 + 7 + 1 = 1 0 7 400 = 25000 \frac{10^{7}}{7^{3} + 7^{2} + 7 + 1} = \frac{10^7}{400} = 25000 .

Subcase 4.3 4.3 : n 9 ( m o d 10 ) n \equiv 9 \pmod{10} This means that n + 1 0 ( m o d 10 ) n + 1 \equiv 0 \pmod{10} , and n 2 + 1 2 ( m o d 10 ) n^2 + 1 \equiv 2 \pmod{10} ; thus, n 2 + 1 n^2 + 1 is a power of two and n + 1 n + 1 is the product of a power of two by 5 b 5^{b} .

{ n + 1 = 2 a 1 5 b n 2 + 1 = 2 a 2 \begin{cases} n + 1 = 2^{a_{1}}5^{b} \\ n^{2} + 1 = 2^{a_{2}} \end{cases}

n = 2 a 1 5 b 1 ( 2 a 1 5 b 1 ) 2 + 1 = 2 a 2 n = 2^{a_{1}}5^{b} - 1 \rightarrow (2^{a_{1}}5^{b} - 1)^{2} + 1 = 2^{a_{2}}

2 2 a 1 5 2 b 2 a 1 + 1 5 b + 2 = 2 a 2 2^{2a_{1}}5^{2b} - 2^{a_{1} + 1}5^{b} + 2 = 2^{a_{2}}

{ 2 a 2 = 2 2 2 a 1 1 5 2 b 2 a 1 5 b + 1 = 1 \begin{cases} 2^{a_{2}} = 2 \\ 2^{2a_{1} - 1}5^{2b} - 2^{a_{1}}5^{b} + 1 = 1 \end{cases}

This means that a 2 = 1 a_{2} = 1 , and thus n 2 = 1 n = 1 n^2 = 1 \rightarrow n = 1 , which we've proven is not a valid solution, and therefore no solutions exist here.

Thus, the only valid numbers that are answers to this problem are 3 3 and 7 7 ; their sum is 10 10 , which leaves a remainder of 0 \boxed{0} when divided by 10 10 , and this is the solution sought.

In subcase 4.1 the equation should have -x, not -2x.

Eilon Lavi - 6 years, 3 months ago

Log in to reply

Oh, that's right! I'm going to fix it right away. Thanks for noticing!

Alexandre Miquilino - 6 years, 3 months ago

Under subcase 4.1, shouldn't the equation be x 2 2 x + ( 2 2 y ) = 0 x^2 - 2x + ( 2 - 2y) = 0 ? This would give us x = 4 ± 8 y 4 2 x = \frac{ 4 \pm \sqrt{ 8y-4 } } {2} instead.

Also, I'm not sure how b = 0 y = 4 b = 0 \rightarrow y = 4 . Shouldn't it be b = 0 , y = 5 0 = 1 b = 0, y = 5^0 = 1 ?

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

I saw that I did everything wrong from that point on, and I'm working on redoing that part. I'm almost done, but the workaround is huge...

Alexandre Miquilino - 6 years, 3 months ago

@Calvin Lin , @Eilon Lavi , I believe I've corrected my proof in its entirety. Can you guys help me verify that it's all ok now?

Alexandre Miquilino - 6 years, 3 months ago

Log in to reply

it seems to me that you want to show that if z > 7 z > 7 is not a solution, then z + 4 z + 4 is not a solution. However, all that you have shown is that both z z and z + 4 z + 4 cannot be solutions at the same time.

For example, it's possible to have case where 13 is not a solution, but 17 is a solution.

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

Well, the outline of my proof is as follows:

  • Suppose z > 7 z > 7 ;

  • Suppose z z is a solution, and furthermore, that z + 4 z + 4 is a solution;

  • I use the fact that both of these numbers are solutions when I subtract one equation from the other;

  • From this, I derive that z z must be equal to three, which contradicts the initial assumption;

So this doesn't allow me to reach the conclusion that say, for example, that if 13 13 is not a solution (which it isn't, for it'd make 5 b = 85 5^{b} = 85 ) then 17 17 isn't a solution as well (which isn't either, for it'd make 5 b = 145 5^{b} = 145 )?

Alexandre Miquilino - 6 years, 3 months ago

Log in to reply

@Alexandre Miquilino RIght, because you needed the assumption of "suppose z is a solution and furthermore z+4 is a solution" This is not satisfied for z = 13.

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

@Calvin Lin Oh, I get it... damn. Do you think you could give me a hint of sorts as to how I could prove that lemma in my solution?

Alexandre Miquilino - 6 years, 3 months ago

Log in to reply

@Alexandre Miquilino I suspect that it is true, but do not know of a simple (or even, any) proof of that.

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

@Calvin Lin Oh, bummer. I was pretty sure I was onto something there. It must be something along those lines... I'll try working on it the next few days, see if I can come up with anything.

Alexandre Miquilino - 6 years, 3 months ago
Lu Chee Ket
Feb 16, 2015

Please explain your solution's first line in which starts with "checking "

Chirayu Bhardwaj - 5 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...