365 = 5 × 73
366 = 6 × 61
= 2 × 3 × 61
Number of non-divisors of 366
= 366 – 2^3
= 358
Number of non-divisors of 365
= 365 – 2^2
= 361
Number of shared non-divisors
= 355
366 will have an extra remainder from all the shared non-divisors, so for this 366 will have an advantage of 355 over 365
Sum of 366’s remainders by the others divisors
= R(366/5) + R(366/73) + R(366/365)
= 1 + 1 + 1
= 3
Sum of 365’s remainders by the others divisors
= R(365/2) + R(365/3) + R(365/6) + R(365/61) + R(365/122) + R(365/183)
= 1 + 2 + 5 + 60 + 121 + 182
= 371
Answer
= 371 – (355 + 3)
= 13 , with 365’s sum of remainders being larger