Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added implementation of Euler's totient function #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ipsin
Copy link

@ipsin ipsin commented Jan 9, 2022

For anyone working in number theory Euler's totient function can be useful, and I thought it might make a welcome addition to your library. I understand this was unsolicited feature, so no worries if you choose not to incorporate it.

Thanks for your time.

@EMBradley
Copy link

The comment on lines 455-456 describes the function incorrectly, although as far as I can tell the actual implementation is correct. The totient function counts all the numbers from 1 to n that are coprime with n, not just the primes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants