# Prove that for all integers $r, s$ and $t$, that $\gcd(\gcd(r, s), t) = \gcd(r, \gcd(s, t))$. [duplicate]

Prove that for all integers $$r, s$$ and $$t$$, that $$\gcd(\gcd(r, s), t) = \gcd(r, \gcd(s, t))$$.

I am stuck in this proof. I have tried using Bézout's Lemma but I have no idea how to proceed further.

Any help would be appreciated.

## marked as duplicate by Arnaud D., GNUSupporter 8964民主女神 地下教會, egreg, Vinyl_cape_jawa, Parcly TaxelFeb 27 at 11:16

You only have to prove that, denoting $$\;D(a_1,,\dots,a_n)$$ the set of divisors common to $$a_1,\dots, n$$, one has $$D(\gcd(r,s),t)=D(r,\gcd(s,t))=D(r,s,t).$$