need explanation for LCM sum code SNON02

can any body explain how totient function can be helpful in finding the sum of series in this question…thanxxxx