By doing a few examples, it seems as if the statement is true. However, I'm having trouble proving (or disproving) it. I know that the numerical value of some $N$ can be written as $n_{0}10^{0}+n_{1}10^{1}+n_{2}10^{2}+\dotsb$ and $10\equiv 1 \pmod{3}$, but this just shows the divisibility rule for $3$. Can I use this somehow?
-
The reaminder of $n^3+n^2+2n+1$ modulo 3 depends only on $n\bmod 3$. Hence you need only verify the claim for $n=1$ and $n=-1$. – Hagen von Eitzen Apr 03 '17 at 16:39
-
1By Fermat, $n^2\equiv 1\pmod{3}$ and $n^3\equiv n\pmod 3$. So $n^3+2n\equiv 0\pmod{3}$ and $n^2+1\equiv 2\pmod{3}$. – Thomas Andrews Apr 03 '17 at 16:44
4 Answers
$$n^3+n^2+2n+1=n^3-n+n^2+3n+1\equiv n^2+1\pmod3$$
As $n^3-n=(n-1)n(n+1)$
Now if $n\equiv\pm1\pmod3,n^2\equiv?$
- 274,582
If $n$ is not divisible by $3$, it must be of the form $3k+1$ ($n\equiv 1 (mod 3)$) or $3k+2$ ($n\equiv 2 (mod 3)$). From here, the basic modular arithmatic can give you what you want.
- 10,143
You have to check every case:
$1)$ If $n\equiv0 \pmod 3 \to n^3+n^2+2n+1\equiv 1\pmod 3$
$2)$ If $n\equiv 1 \pmod 3 \to n^3+n^2+2n+1\equiv 1+1+2+1\equiv 2\pmod 3$
$3)$ If $n\equiv -1 \pmod 3 \to n^3+n^2+2n+1\equiv -1+1-2+1 \equiv 2\pmod 3$
So if you want $n^3+n^2+2n+1\equiv 2\pmod 3$ you must have $n\equiv \pm 1 \pmod 3$
- 21,342
There are three options $n \equiv 0 \mod 3$ (which you are told is not true) or $n \equiv 1 \mod 3$ or $n\equiv -1 \mod 3$.
So $n = 3m \pm 1$ for some integer $m$.
So $n^3 + n^2 + 2n + 1= (3m\pm 1)^3 + (3m\pm 1)^2 + 2(3m \pm 1) + 1$
$= 27m^3 \pm 27 m^2 + 9m \pm 1 + 9m^2 \pm 6m + 1 + 6m \pm 2 + 1=$
$3K \pm 3 + 2 \equiv 1 \mod 3$ where $K = $... one third of the sum of all those terms that are multiples of three.
.... or more sophisticatedly.
$n \equiv \pm 1 \mod 3$
So $n^2 \equiv (\pm 1)^2 \equiv 1 \mod 3$
$n^3 \equiv (\pm 1)^3 \equiv - 1 \mod 3$
So $n^3 + n^2 + 2n + 1 \equiv \pm 1 + 1 \pm 2 +1\equiv \pm 3 + 2\equiv 2 \mod 3$.
- 124,253