proof integer can be written as a linear combination of 2 others
Ok here is my problem, let a,b be integers at least one not 0. Prove any integer c can be written as a linear combination of a and b iff gcd(a,b)|c
I think i got the half starting with assuming c can be written as a linear combination but im not sure where to go when you need to go the other way. I know to assume gcd(a,b)|c let d = gcd then d|c and c = xd i know that d|a and d|b since it is there gcd but am not sure how to get it into the form of a linear combination of a and b. If i let one of them equal 0 i can use the fact that d|a and say b = 0 the a = dy and c = xdy which is a linear combination but that doesnt seem right to me