Can anyone tell me how we derived at the Mathematical Formula for number of multipliers of k in the given range [1 to N] as
(k — 1) / (n — 1).
Can anyone tell me how we derived at the Mathematical Formula for number of multipliers of k in the given range [1 to N] as
(k — 1) / (n — 1).
You have misunderstood the editorial, we are not finding that. Its just that after every n-1, there is a multiple of n. We are just calculating how many will we encounter such multiples and adding them.