# Suppose that $n$ is a positive integer. Prove that the integer $5n+ 3$ is not a perfect square.

Let $n$ be a positive integer such that there is no $a$ where $a^2= 5n+3$.

I know I should use some form of modular arithmetic but I'm not sure where to start.

• You used modular arithmetic as a tag...just show that $3$ is not a square $\pmod 5$. You only have to check five values! Fewer if you use the fact that $(-a)^2=a^2$.
– lulu
Commented Mar 21, 2017 at 0:18

$$5n+3 \equiv 3 \pmod{5}$$

To solve this problem, one must show that $a^2$ is never congruent to $3 \pmod{5}$.

Let $a^2$ be equal to $5k+r$ where $k \in \mathbb{Z}, r \in \mathbb{N}$ with $0 \leq r \leq 4$.

$a^2 \equiv a^2 \pmod{5} \implies (5k+r)^2 \equiv r^2 \pmod{5}$.

We now list all possible values of $r^2 \pmod {5}$.

When $r=0, r^2 \equiv 0 \pmod{5}$.

When $r=1, r^2 \equiv 1 \pmod{5}$.

When $r=2, r^2 \equiv 4 \pmod{5}$.

When $r=3, r^2 \equiv 4 \pmod{5}$.

When $r=4, r^2 \equiv 1 \pmod{5}$.

None of those values are congruent to $3 \pmod{5}$ so therefore $\boxed{a^2 \neq 5n+3}$.

The squares modulo $5$ are $0$, $1$ and $4$, and $5n+3 \equiv 3 \pmod 5$ is none of these, so it cannot be a square modulo $5$, and hence is not a square.

Hint: Every integer number can be written in one of the following forms: $$5k-2,\ 5k-1,\ 5k,\ 5k+1,\ 5k+2$$

Square them all, then suppose $a$ is one of them.

You can probably get this easily by just looking at the first $10$ squares: $1$, $4$, $9$, $16$, $25$, $36$, $49$, $64$, $81$, $100$. You will only ever see final digits that match these, because the tens digits and above do not affect the units digit of the square. So of the final digit options here, $(0,1,4,5,6,9)$, none can be reached by the expression $5n+3$, nor indeed (as a bonus) $5n+2$.