0
$\begingroup$

Given $N$ numbers $n_i$ such that $\forall i \le N, n_i$ $\le10^9$, is there a method to calculate the sum of divisors of their product?

For example, given $\{11,15,17\}$ their product would is $2805$. The divisors of 2805 are $\{1,3,5,11,15,17,33,51,55,85,165,187,255,561,935,2805\}$, and the sum of those divisors (which is what I'm looking for) is $5184$.

I am a programmer and looking to implement this equation in my code. Tackling it with loops does work, but on large numbers it takes about 5 minutes to give a result!

$\endgroup$
0
$\begingroup$

If you have access to MatLab, you could use this divisor(n) function by Yash. From there, just call sum to get your total. For example:

>> sum(divisor(2805))
ans =
  5184
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.