<s>[INST] Proving by absurd that $d \nmid 4,5,10, 20$ What I'm trying to solve is the following:
Given that $(a:b) = 2$, prove that $(a^2 + 2b^2+10:20) = 2$.
So, basically, I think that what I need to do is to show that if $d = a^2 + 2b^2 + 10$, then $2\mid d$ and $d \nmid 4, d \nmid 5, d \nmid 10$ and $d \nmid 20$.
So, starting with 2 and 4 is very straightforward: knowing that $(a:b) =  2$, then we can write $a = 2 \cdot k$ and $b = 2 \cdot q$. Following this:
$2 \mid a^2, 2 \mid 2b^2, 2 \mid 10 \Rightarrow 2 \mid d$.
In the other hand, I want to prove that $4 \nmid d$. As we know:
$2 \mid a \Rightarrow 2^2 \mid a^2$, $2 \mid b \Rightarrow 2^2 \mid b^2 \Rightarrow  4 \mid 2b^2$, but $4 \nmid 10$, so it's clear that $4 \nmid d$.
Then, the following steps are proving that $5 \nmid d$ and $10 \nmid d$. But, I'm not quite sure if my statements are correct. I've say the following:
If $a^2 \equiv 0 \pmod{4} \Rightarrow a^2 \equiv 1 \pmod{5}$. And the same with $b^2$, so that it follows that $2b^2 \equiv 2 \pmod{5}$.
But.. are those statements necessarily correct? Or how should I attack this problem?
 [/INST] Your argument is fine for $4\nmid a^2+2b^2+10$. It is enough to prove that $5\nmid  a^2+2b^2+10$. Suppose that $5\mid  a^2+2b^2+10$. First observe that $5\nmid a$. Because if $5\mid a$ then $5\mid  2b^2+10$ and necessarily $5\mid b$ and hence $5\mid (a,b)=2$ which is not true.
For $a$ such that $5\nmid a$, we can see the following:
$$
a^2\equiv -1\quad or\quad 1 \mod 5
$$
The same is true for $b^2$ and hence we have:
$$
a^2+2b^2\equiv 3\quad or \quad -1\quad or\quad 1 \quad -3 \mod 5\implies 5\nmid a^2+2b^2.
$$
Therefore $ 5\nmid a^2+2b^2+10$ which proves your result.
</s>