TITLE: diophantine equation $ 5x + 19y = 100 $ with natural numbers
QUESTION [0 upvotes]: 5x + 19y = 100 

given the constraint that the two variables belong to N
I get the answer: 
x = 400 
y = (-100) 
I dont know if this is the right asnwer to the question

REPLY [0 votes]: 5 divides into 19 3 times with remainder 4: 19- 3(5)= 4
4 divides into 5 once with remainder 1: 5- 4= 1
So 5- (19- 3(5))= 4(5)- 1(19)= 1
Multiply by 100: 5(400)- 19(100)= 100.
One solution to 5x + 19y = 100  is x= 400, y= -100.
But x= 400- 19n, y= -100+ 5n is also a solution for any n:
5(400- 19n)+ 19(-100+ 5n)= 5(400)- 19(100)- 95n+ 95n= 100.
y will be positive for any n greater than 20.  In particular, for n= 21, y= -100+ 105= 5.  If n= 21, x= 400- 19(21)= 400- 399= 1. 
The only solution with both x and y positive is x= 1, y= 5.
{"set_name": "stack_exchange", "score": 0, "question_id": 3529303}