6

I know that $$\frac{(ak \pm 1)^n}{a}$$ gives remainder $a - 1$ is n is odd or $1$ is n is even.

So, I wrote $ 2^{105} + 3^{105}$ as $8^{35} + 27^{35}$ and then as $(7\cdot 1+1)^{35} + (7\cdot 4-1)^{35}$, which on division should give remainder of $6$ for each term and total remainder of 5 (12/7).

But, as per question, it should be divisible by 7, so remainder should be zero not 5. Where did I go wrong?

[note: i don't know binomial theorem or number theory.]

J. W. Tanner
  • 60,406
  • 1
    For $2^{105} + 3^{105}$ to be divisible by 7, $2^{105}$ and $3^{105}$ both have to be divisible by 7. Powers of 2 under modulo 7 cycle 1, 2, 4, 1, 2, 4,... while powers of 3 under modulo 7 cycle 1, 3, 2, 6, 4, 5, 1, 3, .... With this, you can find what the 105th power of each under modulo 7 will be equal to. – 1110101001 Apr 12 '15 at 07:53
  • @1110101001 Thanks for the hint! But still I don't get it. Even if the unit's digit would be 7, that does not necessarily mean the whole number is 7. – Gaurang Tandon Apr 12 '15 at 07:54
  • 1
    You are not looking at the units digit (which would be modulo 10). Rather, you are looking at the 105th powers of 2 and 3 under modulo 7. The powers of each under modulo 7 have a pattern as I showed above. Using this you can quickly find what the 105th power of each modulo 7 will be. If the sum of these powers under modulo 7 is itself a multiple of 7 then you know it is divisble. – 1110101001 Apr 12 '15 at 07:57
  • @1110101001 Oh. I see! I get it. Thanks! Please put it as an answer, and if possible, also tell exactly where I went wrong in my solution. – Gaurang Tandon Apr 12 '15 at 07:58
  • As per your observation that $(ak \pm 1)^n$ modulo $a$ is either $a-1$ or $1$ based on whether $k$ is odd or even, $(7 * 1 + 1)^{35}$ has remainder $7-1 = 6$ since $1$ is odd, and $(7*4 - 1)^{35}$ has remainder $1$ since $4$ is even. $6+1 = 7$ which is a multiple of 7 and hence it is divisible. – 1110101001 Apr 12 '15 at 08:03
  • @1110101001 You're right. I was wrong to blindly follow my book. Thanks! – Gaurang Tandon Apr 12 '15 at 08:08

5 Answers5

6

Using Little Fermat, we have: $$2^{105} +3^{105}\equiv 2^{105\bmod 6} +3^{105\bmod 6}\equiv 2^{3}+ 3^{3}\equiv 1 + 6\equiv 0 \mod 7.$$

Bernard
  • 175,478
5

$$\begin{align} 2^3 &\equiv 1 (\mod 7)\\ (2^3)^{35} &\equiv 1^{35} (\mod 7)\\ 2^{105} &\equiv 1 (\mod 7)\tag1 \end{align}$$ Again, $$\begin{align} 3^3 &\equiv -1 (\mod 7)\\ (3^3)^{35} &\equiv (-1)^{35} (\mod 7)\\ 3^{105} &\equiv -1 (\mod 7)\tag2 \end{align}$$ Adding (1) and (2) we get, $$\begin{align} 2^{105}+3^{105} &\equiv1+(-1)\space (\mod7)\\ \text{or,}\quad 2^{105}+3^{105} &\equiv0\space (\mod7) \end{align}$$ This implies that $\space2^{105}+3^{105}$ is divisible by 7.

celtschk
  • 43,384
3

We don't even need Fermat's Little theorem if we use Proof of $a^n+b^n$ divisible by a+b when n is odd

Now $105=3\cdot5\cdot7$

So, check for $2^3+3^3,2^5+3^5,2^7+3^7$

2

From $2^3=1\ (7)$ we get $2^{105}=1\ (7)$, and from $3^3=-1\ (7)$ we get $3^{105}=-1\ (7)$. It follows that $2^{105}+3^{105}=0\ (7)$.

1

You can write $2^{105} = 2^{6 \cdot 17}\cdot 8$ and $3^{105} = 3^{6 \cdot 17} \cdot 3^3$ and you can use Fermat's little theorem.

$2^{6 \cdot 17} \equiv 1 \pmod 7$, $8 \equiv 1 \pmod 7$ therefore $2^{2015} \equiv 1 \pmod 7$ while $3^{6 \cdot 17} \equiv 1 \pmod 7$ and $3^3 \equiv 6 \pmod 7$ therefore $3^{105} \equiv 6 \pmod 7$. $2^{105} + 3^{105}\equiv 1 + 6 \equiv 7 \equiv 0 \pmod7.$ We demonstrated that the number is divisible for $7.$