4

What is the remainder if the sum $$(2012^{2013}+2013^{2012})$$ is divided by $$2012\times 2013$$

clark
  • 15,327
Veritas
  • 963

3 Answers3

5

Split the problem in two parts and solve $$ 2012^{2013} + 2013^{2012} \bmod 2013 \equiv 2012^{2013} \bmod 2013 $$ and $$ 2012^{2013} + 2013^{2012} \bmod 2012 \equiv 2013^{2012} \bmod 2012 $$ Now use Eulers theorem: gcd($a,n$) = $1$, then $$a^{\phi(n)} \equiv 1 \bmod n $$ to calculte each of the equations. Then use the Chinese remainder theorem to calculate the solution $\mod 2013\times 2012$. Note that gcd($2012,2013$) = $1$.

5

We don't need Euler Totient Theorem

As $a+1\equiv1 \pmod a,$ $$N=a^{a+1} + (a+1)^a\equiv (a+1)^a\pmod a\equiv1^a \equiv a$$ $\implies N=1+a\cdot A$ for some integer $A$

Similarly, as $a\equiv-1 \pmod{a+1},$ $$N=a^{a+1} +(a+1)^a\equiv a^{a+1}\pmod{a+1}\equiv(-1)^{a+1}\equiv \begin{cases} 1 & \text{ if } a \text{ is odd} \\ -1 & \text{ if } a \text{ is even} \end{cases}$$

If $a$ is odd, $N\equiv1\pmod {a+1}\implies N=1+(a+1)B$ for some integer $B$

Then $1+a\cdot A=N=1+(a+1)B\implies \frac{(a+1)B}a=A$ which is an integer

$\implies a$ divides $(a+1)B$

$\implies a$ divides $B$ as $(a+1,a)=1$

So, $B=a\cdot C$ where $C$ is some integer

Then $N=1+(a+1)B=1+(a+1)\cdot a\cdot C\equiv 1\pmod{a(a+1)}$

If $a$ is even, $1+a\cdot A=N=-1+(a+1)B\implies (a+1)B-a\cdot A=2=2(a+1-a)$

$\implies \frac{a(A-2)}{a+1}=B-2$ which is an integer

$\implies (a+1)$ divides $a(A-2)$

$\implies (a+1)$ divides $(A-2)$ as $(a,a+1)=1$

So, $A=2+(a+1)D$ for some integer $D$

So, $N=1+a\cdot A=1+a\{2+(a+1)D\}=2a+1\pmod{a(a+1)}$

Here $a=2012$ which is even, so the remainder will be $2a+1=2\cdot2012+1=4025$

1

$\rm Note,\ by\ CRT,\ \ x \equiv \color{#C00}a\:\ (mod\ n\!-\!1),\:\ x\equiv \color{#0A0}b\:\ (mod\ n)\!\iff\! x\equiv \color{#C00}a\,n + \color{#0A0}b\,(1\!-\!n)\:\ (mod\ n(n\!-\!1))\!\!\!\!\!\!$

$\rm x = (n\!-\!1)^n\! + n^{n-1}\! \equiv \color{#C00}1\:\ (mod\ n\!-\!1),\:\ x \equiv \color{#0A0}{(-1)^{n}}\: (mod\ n),\ $ so applying the above yields

$$\begin{eqnarray}\rm mod\ n(n\!-\!1)\!:\ \ (n\!-\!1)^n\!+n^{n-1}\! &\equiv\,&\rm \color{#C00}1\cdot n + \color{#0A0}{(-1)^{n}}(1\!-\!n)\\ &\equiv\,&\rm 2n\!-\!1\ \ if \ \ n\ \ is\ \ odd\\ &\equiv\,&\rm 1\qquad\ \: if\ \ n\ \ is\ \ even\end{eqnarray}$$

Your special case is $\rm\,n = 2013,\,$ so $\rm\, 2012^{2013}\!+2013^{2012}\!\equiv2\cdot 2013\!-\!1\:\ (mod\ 2013\cdot 2012)$

Note $ $ The Chinese Remainder (CRT) calculation is easy since one modulus is $\equiv 1$ mod the other, which makes trivial the inversion in the Easy CRT formula. Alternatively, direct calculation gives $\rm\:mod\ n\!-\!1\!:\ \color{#c00}a \equiv x\equiv \color{#0a0}b\!+\!nk\equiv b\!+\!k\:\Rightarrow\:k\equiv a\!-\!b\:\Rightarrow\:x = b\!+\!n(a\!-\!b\!+\!j(n\!-\!1))$ $\rm\equiv na\!+\!(1\!-\!n)b\:$ $\rm\ (mod\ n(n\!-\!1))$.

Math Gems
  • 19,574