Since the remainder is 5 in both the cases, we have to subtract 5 from each number.
245−5=240 and 1029−5=1024
Now, we have to find the H.C.F of 240 and 1024.
By Euclid's division lemma,
a=bq+r, 0≤r<b
Here, a = 1024 and b = 2401024=240×4+64240=64×3+4864=48×1+1648=16×3+0
Therefore, H.C.F is 16.
So, the largest number that divides 245 and 1029 leaving remainder 5 in each case is 16.