27a = 17 (mod 40)
27 mod 40 = 27 + 13
27*2 mod 40 = 14
27*5 mod 40 = 15
27*8 mod 40 = 16
27*11 mod 40= 17
a = 40m + 11, where m =0, 1, 2, 3......etc.
The smallest value of "a" =[40*0 + 11] = 11
The 2nd smallest value of "a" =[40*1 + 11] = 51
The sum =11 + 51 = 62