Is there a "trick" to finding a solution $(x,y,z)$ of the Diophantine equation $$31x + 30y + 29z = 366$$ where $0 \leq z \leq y \leq x $?
Can you solve this Diophantine equation really fast: $31x + 30y + 29z = 366$
3
$\begingroup$
diophantine-equations
puzzle
-
8Yes. Happy New Year! – 2017-01-03
-
2@JoeyZou "Leap year" would have been more appropriate. – 2017-01-03
3 Answers
16
Hint: How many months have $31$ days? $30$ days? $29$ days?
-
2$(6,6,0)\,$, $(7, 4, 1)\,$, $(8, 2, 2)\,$, $(9, 0, 3)\,$ ...hmm ;-) – 2017-01-03
3
$$31*6=186$$
Then see $60=31+29$ and you can sum $30$'s and $60$'s to get the condition.
$$366=31*7+30*4+29*1$$
-
2Huh? $31\cdot 6 + 30\cdot 4 + 29\cdot 0 = 306$. – 2017-01-03
-
0Sorry the mistake, correcting. I didn't add the $+1$ to 31 and 29. – 2017-01-05
1
Solving $(N+1)x + Ny = M$ is the same as dividing $M$ by $N$: $366 = 30*12 + 6 = 31*6 + 30*6$. $z$ equals $0$.