# Given $a, b$ positive integers, such that $\gcd(a, b) = 2$, $\gcd(a, 5) = 1$ and $a|5b$, show $a = 2$

Given $$a, b$$ positive integers, such that $$\gcd(a, b) = 2$$, $$\gcd(a, 5) = 1$$ and $$a|5b$$, show $$a = 2$$.

My solution:

Once for $$d = gcd(a, b) \implies d|a$$ and $$d|b$$, therefore for $$\gcd(a, b) = 2$$, $$2|a$$ and $$2|b$$, this implies $$a, b$$ are even numbers. Once the greatest common factor of $$a$$ and $$b$$ is $$2$$, therefore $$a$$ or $$b$$ must be equal to $$2$$.

According to Bézout's Theorem, for $$a, b \in\mathbb{Z}$$, such that $$d = gcd(a, b)$$. Then there exist $$x, y \in\mathbb{Z} : ax + by = d$$. Therefore, $$2 = ax+by$$ and $$1 = ax + 5y$$. So,

$$2-by = 1 - 5y \implies 1 = by - 5y \implies 1 = y(b-5)$$

Considering $$b = 2$$, so $$1 = y(2-5) \implies 1 = -3y \implies y = -\dfrac{1}{3}$$, but $$-\dfrac{1}{3}\not\in \mathbb{Z}$$, therefore $$a = 2$$.

I am not sure if this solution is correct. I even not considered $$a|5b$$, how can I use it in the proof?

I would like to know a better solution or what would make my attempt better.

• The issue with your proof is that you use Bézout's Theorem two times but use the same numbers twice. From Bézout's Theorem you know that there must exist $x_0,y_0,x_1,y_1\in \mathbb{Z}$ such that $ax_0 + by_0 = 2$ and $ax_1 + 5y_1 = 1$; it's not the same $x$ and $y$ for both relations. Commented Feb 8, 2021 at 19:34

Wrong : counter example is $$a = 4, b = 6.$$
From Number Theory, if $$r,s$$ relatively prime and $$r|(ks)$$, then $$r|k$$.
$$\gcd(a, b) = 2$$, $$\gcd(a, 5) = 1$$ and $$a|5b$$, show $$a = 2$$
From the premises, you therefore have that $$a|b$$.
Therefore, $$\gcd(a,b) = a = 2.$$