![]() |
VOOZH | about |
Hardy Ramanujam theorem states that the number of prime factors of n will approximately be log(log(n)) for most natural numbers n
Examples :
5192 has 2 distinct prime factors and log(log(5192)) = 2.1615
51242183 has 3 distinct prime facts and log(log(51242183)) = 2.8765
As the statement quotes, it is only an approximation. There are counter examples such as
510510 has 7 distinct prime factors but log(log(510510)) = 2.5759
1048576 has 1 prime factor but log(log(1048576)) = 2.62922
This theorem is mainly used in approximation algorithms and its proof lead to bigger concepts in probability theory.
The number of distinct prime factors is/are 3 The value of log(log(n)) is 2.8765
Time Complexity: O(sqrt(n))
Auxiliary Space: O(1)