# Proof that number ending in $66$ or $06$ is congruent to $2 \text{ mod } 4$

Let $N$ be an integer such that we can represent $N$ by its digits as $N=a_na_{n-1}\cdots a_1a_0$. We want to prove that if $a_0,a_1=6$ or if $a_1=0$ and $a_0=6$ then $N\equiv 2 \text{ mod } 4$.

I'm unsure how to proceed here.

I also want to prove that $N$ is a perfect square only if $N\equiv 0 \text{ mod} 4$ or $N\equiv 1 \text{ mod} 4$.

My attempt Through trial with squares $1,2,3$ I notice a cyclic pattern $1,0,1,0...$ as the remainder. I proceeded by induction assuming that $k^2 \equiv 0 \text{ mod} 4$. thus $$k^2+1 \equiv 1 \text{ mod} 4$$ But I'm unsure how to get that $2k\equiv 0 \text{ mod } 4$ to complete this. Is the exponentiation identity $a\equiv b \text{ mod } c$ implies that $a^2\equiv b^2 \text{ mod } c$ an iff statement? If so my induction hypothesis gives that $k \equiv 0 \text{ mod } 4$ and the mulitplication rule gives $2k$ congruent to $0$, where I can then apply the addition rule.

• Note that any such number must be of the form $100n+66$ or $100n+6$. And $100$ is divisible by $4$. – lulu Jul 6 '18 at 22:02
• Where do the squares come from in your attempt? – Arnaud Mortier Jul 6 '18 at 22:06
• @ArnaudMortier $\mathbb{Z_+}$ – john fowles Jul 6 '18 at 22:07
• No I mean there are no squares in the question. – Arnaud Mortier Jul 6 '18 at 22:08
• @ArnaudMortier well the main question is "Can a number that contains $600$ sixes and some $0's$ be a square". So the observation that squares must either have remainder $1$ or $0$, allows me to remove each case--ending $66$, $06$, or $0's$ – john fowles Jul 6 '18 at 22:13

These numbers are $100n+66$ or $100n+6$ since $100=0$ mod $4$ and $66=2$ mod $4$ ($6=2$ mod $4$) the result follows.

part 1:
Any $N$ ending in the digits $66$ or $06$ will be of the form $N=20k+6$.

Then since $20k\equiv 0 \bmod 4$ and $6\equiv 2\bmod 4$ we will have $N\equiv 2\bmod 4$.

part 2:
Suppose $N$ is a perfect square. Either $N$ is an odd square or an even square.

Even: $N=(2k)^2=4k^2\equiv 0 \bmod 4$

Odd: $N=(2k+1)^2=4k^2+4k+1\equiv 1 \bmod 4$

Thus $N$ can only be a perfect square if $N \in \{0,1\} \bmod 4$

• How did it occur to you to use $N=20k+6$ instead of $N=100k+66$, $N=100k+6$? What would you have done for numbers ending in $88$ or $08$, or the case of $77$ or $07$? – john fowles Jul 6 '18 at 22:38
• I was just using a multiplier for the generic $k$ that divides both $100$ and $66-6=60$ and is $0 \bmod 4$ – Joffan Jul 6 '18 at 22:51
• @johnfowles ...and for $88/08$ case, the same would apply, but for $77/07$ they are actually two different cases $\bmod 4$; then using $100$ is probably easier (and is a better general tool anyway if you have a lot of cases). – Joffan Jul 6 '18 at 23:53