For how many natural numbers(<=100) is $1111^n +2222^n+3333^n+4444^n$ divisible by 10?

297 Views Asked by At

For how many natural numbers (0 not included) $n \leq 100$ is $1111^n +2222^n+3333^n+4444^n$ divisible by 10?

I factored out $1111^n$ and got $1111^n(1+2^n+3^n+4^n)$. So $1+2^n+3^n+4^n$ must be divisible by 10. I figured out that this is divisible by 10 for all odd n, but I don't know how to find the other solutions, if any.

5

There are 5 best solutions below

5
On

If $\varphi$ is Euler's totient function, $\varphi(10)=4$. So the exponents are cyclic mod $10$ with a period of $4$. So it suffices to consider $n=1,2,3,4$. Clearly $n=1$ works; for $n=2$, we have $1111^2\cdot 30$; for $n=3$, we have $1111^3\cdot 100$; for $n=4$, we have $1111^4\cdot 354$. So there are $75$ solutions.

0
On

If you divide $1^n$, $2^n$, $3^n$, and $4^n$ by 10, each goes through a cycle of remainders:

$1: 1, 1, 1, 1$

$2: 2, 4, 8, 6$

$3: 3, 9, 7, 1$

$4: 4, 6, 4, 6$

So $1^n+2^n +3^n + 4^n$ goes through the cycle of remainders $0, 0, 0, 4$, and thus will be divisible by $10$ whenever $n$ is not divisible by $4$.

0
On

This can be simplified using the patterns for exponents. $1^n$ always ends in $1$. $2^n$ repeats a pattern where its last digit ends in $2, 4, 8, 6$. $3^n$ repeats a pattern where its last digit ends in $3, 9, 7, 1$. $4^n$ repeats a pattern where its last digit ends in $4, 6$. So adding up our final digits for the four unique cases, we get:

CASE 1: $1+2+3+4 = 10$

CASE 2: $1+4+9+6 = 20$

CASE 3: $1+8+7+4 = 20$

CASE 4: $1+6+1+6 = 14$

Each case corresponding to one of four equivalence classes that the sum can be partitioned into using the equivalence relation that groups the sum by the value each number is being raised to, n, modulus 4.

The cases where the sum of these four least significant digits of the members of the sum are 0 are solutions to our problem. Each of these cases happens 25 times throughout the numbers 1...100 so there are 75 solutions.

0
On

$$1^n+2^n+3^n+4^n\equiv0\pmod2\text{ for }n\ge0$$

As $2^3\equiv3,2^2\equiv4\pmod5,$

$$1^n+2^n+3^n+4^n$$

$$\equiv1+2^n+(2^3)^n+(2^2)^n$$

$$\equiv\begin{cases}\dfrac{2^{4n}-1}{2^n-1}\equiv 0 &\mbox{if } 2^n-1\not\equiv0\pmod5\iff4\nmid n \\ 4 & \mbox{if } 4\mid n \end{cases}\pmod5$$

$$\implies1^n+2^n+3^n+4^n\equiv0\pmod{[5,2]}\text{ if }4\nmid n$$

0
On

If you take a multi-digit number $N$ with a last digit of $d$, it to a power, and take the last digit, the result will be the same as taking the last digit $d$ and raising it the power, and taking the last digit.

(Why? Because $(10M +d)^n = d^n + n*10M*d^{n-1} + c_2*100M^2*d^{n-2} + ...... +c_k*10^kM^kd^{n-k} + ...... + 10^nM^n$ and $10$ will divide all the terms but the first. So all the terms but the first will end with $0$ and contribute nothing to the final digit. SO the $d^n$ is the only thing that affects the final digit.)

And if you add $A^n + B^n + C^n+....$ and take the last digit, it will the same as taking the last digits of $A,B,C,....$, raising the last digits to that power, adding the power of the last digits together, and taking the last digit.

(Why? Well, when you add a bunch of terms only the last digit contributes to the last digit of the sum)

ANd a number is divisible by $10$ if and only if it's last digit is $0$.

So the last digit of $1111^n + 2222^n + 3333^n + 4444^n$ is the same as the last digit of $1^n + 2^n + 3^n + 4^n$.

And the last digits cycle.

Why? Because there are only $10$ possible values $d^n$ can have as a last digit. And if $d^j$ and $d^k$ both have $e$ as a last digit, then $d^{j+1}=d*d^j$ and $d^{k+1}=d*d^k$ will both have the last digit of $d*e$ as their last digits. This means once $d^k$ and $d^m$ have the same last digit (which must happen as there are only $10$ possible last digits) the the next powers will have the same last digits. And therefore the ones after that will to. And so on forever.

So let's find the cycles.

$1, 1^2=1$ etc so $1^n$ will always have $1$ as its last digits. (That's a cycle of $2$).

$2^1=2; 2^2 =4;2^3=8;2^4=16$ last digit $6; 2^5$ has the last digit of $6*2=12$ has the last digit of $2$. ($2^5 = 32=2*16$ so its last digit of $2$ but we didn't need to multiply by $16$; multiplying by $6$ was enough). We have returned to $2$. Last digit of $2^1 =2$ and last digit of $2^5=2$ so that a cycle of $4$.

$3^1=3; 3^2 = 9; 3^3=27$ last digit $7; 3^4$ will have the same last digit of $7*3=1$ and $3^5$ takes us back to $3^5=3$. (Note: $3^4 =81$ wouldn't have be too hard but $3^5 = 243$ is more work than we need when we could do $1*3=3$.) (Also note: once we get that the last digit of $3^4$ is $1$ well the obviously the next well take us back to $3$). So this is a cycle of $4$.

And $4^1= 4; 4^2$ has last digit $6$. $4^3$ has same last digit of $6*4=24$ if $4$. So $4^1$ and $4^3$ have the same last digit so that is a cycle of $2$.

These cycles of $1,4,4,2$ will all repeat after four iterations.

$1^1 + 2^1 + 3^1 + 4^1 = 1+2+3+4 = 10$ has last digit $0$ and is divisible by $10$.

$1^2+2^2 + 3^2 + 4^2$ will have same last digit as $1+4+9+6 = 20$ which is $0$. So is divisible by $10$.

$1^3 + 2^3 + 3^3 + 4^3$ will have the same last digit as $1 + 8 + 7 + 4=20$ which is $0$. So is divisible by $10$.

$1^4 + 2^4 + 3^4 + 4^4$ will have the same last digit as $1 + 6 + 1 + 6 = 14$ which is $4$. So is not divisible by $10$.

then the next four well repeat.

$1^5 + 2^5+3^4+4^5$ will have the same last digit of $1^1 + 2^1 + 3^1 + 4^1$ and so on.

So $\frac 34$ of the numbers will have $0$ as its last digit and $\frac 14$ will have $4$ as it's last digit. In a cyclee of $4$ the first, second, and third, values will yield a last digit of $0$ but the fourth will yield a different last digit..

In other words $1111^n + 2222^n + 3333^n + 4444^n$ is not divisible by $10$ if and only if $n$ is divisible by $4$only if