Question Number 104190 by mr W last updated on 19/Jul/20

integers x,y satisfy 2x+15y=2019.  find the minimum of ∣y−x∣.

Commented bymr W last updated on 20/Jul/20

thank you all!  2 is correct.

Answered by mathmax by abdo last updated on 19/Jul/20

let consider congruence modulo 2(prime)  e ⇒0 +15^−  y^−  =2019^−  ⇒y^−  =1^−  ⇒y =2k+1   (k ∈Z)  2x+15y =2019 ⇒2x +15(2k+1) =2019 ⇒2x +30k +15 =2019 ⇒  2x =2019−15 −30k =2004−30k ⇒x =1002−15k ⇒  min∣y−x∣ =min∣2k+1−1002+15k∣ =min∣17k−1001∣=0 if k=[((1001)/(17))]

Answered by floor(10²Eta[1]) last updated on 20/Jul/20

gcd(2, 15)=1∣2019⇒has solution.  15=2.7+1⇒15−2.7=1 (×2019)  ⇒2.(−14133)+15.(2019)=2019  (x_0 , y_0 )=(−14133, 2019) is a solution.  the general solution to a diophantine  equation of the form ax+by=c is:  (x, y)=(x_0 −((bk)/(gcd(a, b))), y_0 +((ak)/(gcd(a, b)))), k∈Z  ⇒(x, y)=(−14133−15k, 2019+2k)  min∣y−x∣=min∣2019+2k−(−14133−15k)∣  =min∣16152+17k∣  16152+17k>0⇒k≥−950  so the minimum value is when k=−950  ⇒16152+17(−950)=2

Answered by 1549442205PVT last updated on 20/Jul/20

We have x=((2019−15y)/2)=1009−7y+((1−y)/2)∈Z  ⇒put ((1−y)/2)=a(a∈Z)⇒y=1−2a  ⇒x=1009−7(1−2a)+a=15a+1002  ⇒∣y−x∣=∣17a+1001∣=∣17(a+59)−2∣  Put ∣17(a+59)−2∣=m⇒m^2 =17^2 (a+59)^2 −68(a+59)+4  =17(a+59)[17(a+59)−4]+4≥4⇒m≥2  Since ,a+59∈Z,if a+59>0 then a+59≥1  ⇒17(a+59)−4≥13⇒17(a+59)[17(a+59)−4≥17×13  if a+59<0 then (a+59)≤−1⇒17(a+59)−4≤−21  ⇒17(a+59)[17(a+59)−4≥(−17)×(−21)  and when a−59=0 we get m^2 =4  Therefore,m≥2 which means ∣y−x∣_(min) =2  when a=−59⇔ { ((x=117)),((y=119)) :}  other way:  x=((2019−15y)/2)⇒∣y−x∣=∣((17y−2019)/2)∣  =∣8y−1009+((y−1)/2)∣.Put ((y−1)/2)=k  We get  y=2k+1⇒∣y−x∣=∣8(2k+1)−1009+k∣  =∣17k−1001∣=∣17(k−59)+2∣  i)If k=59 then ∣17(k−59)+2∣=2  ii)If k≥60 then ∣17(k−59)+2∣≥19  iii)If k≤58 then 17(k−59)+2≤−17+2=−15  ⇒∣17(k−59)+2∣≥15  Compare three above cases we infer  ∣17(k−59)+2∣_(min) =2 when k=59⇒y=2k+1=119  x=((2019−15y)/2)=117.Thus,∣y−x∣_(min) =2  when⇔(x;y)=(117,119)