Totient
Euler's totient function: the count of integers in 1..n coprime to n.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Euler's totient functionMathWorldTotientFunctionWikidataQ190026Encyclopedia of MathematicsEuler_functionBritannicatopic/Euler-phi-functionDLMF27.2.E7FungrimTotient✓Fungrim entryOEISA000010Wolfram LanguageEulerPhi!Totient(n)count of integers in coprime to , Euler's .Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer) -> integer | compute-engine | always |
(number) -> integer | number-theoryreplaces compute-engine | always |
Details
- Also called Euler's phi function; central to RSA key generation and elementary number theory.
- Multiplicative: whenever .
- For , .
- Divisor sum identity: .
- , as in Wolfram; a list argument is threaded over element-wise.
Plot
Examples
Scope #
About
| Examples | 34 |
|---|---|
| Checked against | Wolfram Language 33 agree1 differSageMath 30 agree1 differSymPy 29 agree2 errormathlib4 8 agreeOscar 10 agree3 errorJulia 28 agree2 error |
| Crosswalk | WikipediaMathWorldWikidataEncyclopedia of MathematicsBritannicaDLMFFungrimFungrim entry ×16OEISWolfram LanguageSageMathSymPyOscarJulia |
Implementation
mapped
wolframpackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.tsmapped
oscarpackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
mathlib4packages/oracle/src/mappings.ts See also: MultiplicativeOrder, DivisorSigma