Hacker News new | past | comments | ask | show | jobs | submit login

The sieve of Eratosthenes can be adapted to build tables of other number properties: smallest prime factor, totient function, number of unique prime factors (omega), product of unique prime factors (radical).

Contains code in Python and other languages: https://www.nayuki.io/page/the-versatile-sieve-of-eratosthen...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: