First of all subtract 382 by 4, 509 by 5 and 636 by 6.
382 - 4 = 378
509 - 5 = 504
636 - 6 = 630
Factor of 378, 504 and 630 is
378 = 2 x 3 x 3 x 3 x 7
504 = 2 x 2 x 2 x 3 x 3 x 7
630 = 2 x 3 x 3 x 5 x 7
Common factor = 2 x 3 x 3 x 7 = 126
H.C.F. = 126
126 is the greatest number that will divide 382, 509 and 636 leaving remainders 4, 5 and 6 respectively.