S(m,n) = { k1, k2, k3, ..., kx }, Each ki can meet n % ki + m % ki >= ki. Now output the sum of phi , (1
S(m,n) = { k1, k2, k3, ..., kx }, Each ki can meet n % ki + m % ki >= ki. Now output the sum of phi(ki) , (1<= i <=x) which stands for the number of ki's relatively prime which are smaller than ki .

(图片来源网络,侵删)