Modify the Eratosthenes Sieve to count the number of all divisors of the given number. Find an algorithm which for given number N <= 10000 will create a field of N numbers such that the value of the i-th element of the field is the number of all divisors of the number i for each i <= N, but the solution mustn´t be worse than O(n.log n).(adsbygoogle = window.adsbygoogle || []).push({});

I don´t have any idea how to proceed if I should satisfy the given maximal difficulty. Can anybody give me some hint? Thank you.

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# An algorithm based on Eratosthenes Sieve

Loading...

Similar Threads for algorithm based Eratosthenes | Date |
---|---|

C/++/# Is there a flaw in my longest common subsequence algorithm? | Feb 24, 2018 |

C/++/# Finding duplicates algorithm | Jan 20, 2018 |

Perceptron algorithm initial vector | Dec 28, 2017 |

C/++/# What should I be most familiar w/for C++ Data Structs & Algorithms | Dec 1, 2017 |

Time-based differential analysis | Mar 8, 2017 |

**Physics Forums - The Fusion of Science and Community**