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?
 A: 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.
A: As you said, from $(a,b)=1$, we may write $a=2a',b=2b'$ with $(a',b')=1$. Thus we get by substitution that $$(4a'^2+8b'^2+10,20)=2(2a'^2+4b'^2+5,10)$$
Whence $d$ has a factor of $2$. It remains to show that neither $2$ nor $5$ are a factor of $2a'^2+4b'^2+5$. The first claim should be clear, for this number is odd, since it is the sum of an even number with an odd number. Thus it remains to show $5$ is not a factor. Working modulo $5$, we would need $$2a'^2+4b'^2\equiv 0\mod 5\\2a'^2\equiv b'^2\mod 5$$
But the squares modulo $5$ are $1,-1$, and in no case (that is, substituting $a',b'$ for possible values $1,-1$) the above equation would hold. Thus $5$ cannot divide $2a'^2+4b'^2+5$.
