2

Lets say: $n^2=3k+1$ ; $n\neq3$.

I'm trying to prove this by induction, therefore:

$(n+1)^2=n^2+2n+1=3k+2n+2$

Any suggestion on how to move foward?

Cornman
  • 11,065
  • 4
  • 30
  • 57
thunder
  • 451
  • If $n^2 = 3k+1$ for some integer $k$, then $n \bmod 3$ is $1$ and you're done. So your "let's say" is an instance of "assuming what you're trying to prove," which leads to incorrect proofs in general. – John Hughes Jun 03 '19 at 19:45
  • 2
    Well, the induction hypothesis doesn't obviously apply to consecutive integers (since knowing that $3,\nmid ,n+1$ does not imply that $3,\nmid ,n$.) Just use the fact that $3,\nmid ,n\implies n=3k\pm 1$. – lulu Jun 03 '19 at 19:46
  • If you insist on using induction, work in cases. First case is $n=3k+1$, and use induction on $k$. Second case is $n=3k+2$, and again use induction on $k$. But, really, it's better to avoid induction here. – lulu Jun 03 '19 at 19:47

5 Answers5

1

You don't need induction for this.

Between 3 consecutive numbers $n-1$, $n$ and $n+1$ there is exactly on divisible by 3. In your case that is $n-1$ or $n+1$ so their product $(n-1)(n+1)=n^2-1$ is divisible by 3. So the remainder when $n^2$ is divided by 3 is 1.

nonuser
  • 90,026
1

You are close here and you need no direct induction: write $\;n=3k+a\;$ , with $\;a\in\{1,2\}\;$ , then

$$n^2=(3k+a)^2=9k^2+6ka+a^2=a^2\pmod 3$$

Now just check that both $\;1^2=2^2=1\pmod 3\;$ and we're done.

DonAntonio
  • 211,718
  • 17
  • 136
  • 287
1

If 3 does not divide $n$, that means that $n$ has remainder 1 or 2 by division with 3.

So either $n=3k+1$ or $n=3k+2$.

In both cases we have $n^2=(3k+1)^2=9k^2+6k+1=3(3k^2+2k)+1\equiv 1\mod 3$

or $n^2=(3k+2)^2=3(3k^2+4k)+4=3(3k^2+4k)+3\cdot 1+1\equiv 1\mod 3$

Cornman
  • 11,065
  • 4
  • 30
  • 57
1

We can see that $1^2\equiv 1\mod 3$ and $2^2\equiv 1\mod 3$. Now prove that $(a+3)^2\equiv a^2\mod 3$. Now by induction can you see that we have our result?

Julian Mejia
  • 4,438
1

It's very simple using congruences modulo $3$: if $n\not\equiv 0\bmod 3$, then $n\equiv 1\;\text{ or }\;2\bmod 3$, so $$n^2\equiv 1^2=1\;\text{ or }\;2^2=4\equiv 1 \text{ again, }\bmod 3$$

Bernard
  • 175,478
  • Easier using $,2\equiv -1,$ so $,(\pm1)^2\equiv 1,, $ But the OP seems to seek an inductive proof (and this is surely a dupe). – Bill Dubuque Jun 03 '19 at 19:53
  • I know, but I didn't want to go into these details, not knowing the O.P.'s knowledge of congruences. – Bernard Jun 03 '19 at 19:56