Among all 6-digit multiples of 22 of the form 5d5,77e where d and e are digits, what is the maximum value of d?
Among all 6-digit multiples of 22 of the form 5d5,77e where d and e are digits, what is the maximum value of d?
5d577e = 0 (mod22)
5d577e = 505770 + 10000d + e
505770 + 10000d + e (mod22)
505770 (mod22) == 12 (mod22)
10000 (mod22) == 12 (mod22)
so
0== 505770 + 10000d + e (mod22)
== 12+12d+e (mod22)
== -10(d+1) +e (mod22)
-10(d+1)
-10
-20
-30 +8 = -22 d=2, e=8 525778 (mod22) = 0
-40
-50 + 6 = -44 d=4, e=6 545776 (mod22) = 0
-60
-70 + 4 = -66 d=6, e= 4 565774 (mod22) = 0
-80
-90 + 2 = -88 d=8, e= 2 585772 (mod22) = 0
-100
they are all the pairs that work.