> with(numtheory): > ifactors(795124)[2]; [[2, 2], [11, 1], [17, 1], [1063, 1]] > A:=0; A := 0 > for d1 from 1 to 2 do for d2 from 1 to 10 do for d3 from 1 to 16 do for d4 from 1 to 1062 do if irem(2,d1)=0 and irem(10,d2)=0 and irem(16,d3)=0 and irem(1062,d4)=0 then A:=A+(phi(d1)*phi(d2)*phi(d3)*phi(d4)/phi(ilcm(d1,d2,d3,d4))): fi; od; od; od; od; > A; 480