How can I formally prove that two to the power of some n all plus one is divisible by three when n is odd (1,3,5,7,...)? Or, another words,$$2^n+1=3k \Leftrightarrow (n=2m+1,m \in \mathbb N)\bigwedge(k \ge 1,k \in \mathbb N)$$It is actually true, for example:$$2^1+1=2+1=3=3\cdot1\\2^3+1=8+1=9=3\cdot3\\2^5+1=32+1=33=3\cdot11\\etc.$$ The Little Fermat's theorem does NOT look quite convenient for this case. Should I consider the group $1+\mathbb Z/3\mathbb Z$? Considering $2^{2\cdot m+1}+1=2\cdot2^{2m}+1=2\cdot4^m+1=3\cdot(???)?$ It just has no sense.
-
1Welcome to Math Stack Exchange. By Fermat's Little Theorem (if you need that), $2^2\equiv1\pmod3$ so $3$ divides $2^{2m}-1$ not $2^{2m}+1$ – J. W. Tanner Jun 26 '19 at 15:03
6 Answers
If you know modular arithmetic this is simple:
$$2^n+1 \equiv (-1)^n+1 \pmod{3}$$
Your question then becomes Prove that $(-1)^n+1 \equiv 0 \pmod{3}$ if and only if $n$ is odd.
- 132,525
-
It looks like a correct intermediate step, great, thank you! But how can I formally proove that $2^n+1≡(-1)^n+1 \ (mod 3)$ ? This trivial fact requires some prooving. – Andrey Mironov Jun 26 '19 at 15:14
-
@AndreyMironov $2^n+1≡(-1)^n+1 \ (mod 3)$ means by definition $$3| 2^n+1-(-1)^n-1$$ Now use the formula for $a^n-b^n$ to see why $3 | 2^n-(-1)^n$. – N. S. Jun 26 '19 at 15:20
-
@Andrey It's a very special case of exponent reduction modulo the order of the base - see my answer and its links. – Bill Dubuque Jun 27 '19 at 22:35
Modulo $3$, $2^n+1=(-1)^n-(-1)$, which is $0$ iff $n$ is odd.
- 115,835
-
It looks like a correct intermediate step, great, thank you! But how can I formally proove that $2^n+1≡(-1)^n+1 \ (mod 3)$ ? This trivial fact requires some prooving. – Andrey Mironov Jun 26 '19 at 15:14
-
Note that $$2^n+1 \equiv (-1)^n+1 (mod 3)$$ For odd values of $n$ we have $$(-1)^n+1\equiv 0 (mod 3)$$
For even values of $n$ we have $$ (-1)^n+1 \equiv 2 (mod 3)$$
Thus $2^n +1 $ divides $3$ if and only if $n$ is odd.
- 68,728
-
It looks like a correct intermediate step, great, thank you! But how can I formally proove that $2^n+1≡(-1)^n+1 \ (mod 3)$ ? This trivial fact requires some prooving. – Andrey Mironov Jun 26 '19 at 15:15
-
Since $2\equiv -1 (mod 3)$ we get $2^n\equiv (-1)^n (mod 3)$ – Mohammad Riazi-Kermani Jun 26 '19 at 15:48
1) Let $n$ be odd.
Polynomial.$y:= x^n+1^n$, has a zero at $x=-1$.
$(x-(-1)) =(x+1)$ is a factor.
$x^n+1^n= (x+1)p_{n-1}(x)$, where $p_{n-1}$ is a polynomial of degree $n-1$.
$x=2$:
$2^n +1= (2+1)p_{n-1}(2)$, and we are done.
2) Le n be even.
$y= x^n+1^n$;
Is $x=-1$ a zero, i.e $(x+1)$ a factor?
- 20,344
- 2
- 17
- 28
Here's an explicit calculation and demonstration, not reducing modulo $3$.
If $n=2m+1$, then
$$2^n+1=2+2^n-1=2+\sum_{k=0}^{n-1}2^k=2+1+\sum_{k=1}^{n-1}2^k$$
$$=2+1+\sum_{j=1}^{m}(2^{2j-1}+2^{2j})=3+\sum_{j=1}^m(1+2)2^{2j-1}=3\left(1+\sum_{j=1}^m2^{2j-1}\right).$$
- 60,406
-
On the other hand, if $n=2m$ then $$2^n+1=2+3\sum_{j=0}^{m-1}2^{2j}$$ – J. W. Tanner Jun 26 '19 at 16:01
-
I could have said just $$2^n+1=3\left(1+\dfrac{2^n-2}3\right)=3\left(1+\dfrac{2^{2m+1}-2}{2^2-1}\right)=3\left(1+\sum_{j=1}^{m}2^{2j-1}\right)$$ – J. W. Tanner Jun 26 '19 at 16:57
It can be viewed as a special case of a handy basic consequence of the $\rm\color{#c00}{order}$ of an element.
$\!\bmod 3\!:\,\ 0\,\equiv\, 2^{ N}\!+1\,\equiv\, (-1)^{N}+1\!\iff\! (-1)^{\color{#0a0}N}\equiv\, (-1)^{\large\color{#0a0}1}\!\!\iff \color{#0a0}{N\equiv\, 1}\pmod{\!\color{#c00}2},\ $ by
modular exponent reduction $ $ if $\,a\,$ has $\,\color{}{{\rm order}\,\ \color{#c00}\ell}\ $ then $\ a^{ \color{#0a0}N}\! \equiv a^{\color{#0a0}K}\!\!\iff\! \color{#0a0}{N\equiv K}\pmod{\!\color{#c00}\ell}$
using the simple observation: $\ {-}1\,$ has order $\,\color{#c00}2\,$ by $\ (-1)^{\large 1}\!\not\equiv 1,\,\ (-1)^{\large\color{#c00}2}\equiv 1$.
- 272,048
-
That's both formal and reasonably general (at this level). If you do know some group theory then you might find it instructive to reformulate it in that language. – Bill Dubuque Jun 26 '19 at 16:56