Euler's Totient φ(n) Calculator - Online Phi Function
Search for a tool 🔎︎ Search a tool on dCode ⏎ Browse the full dCode tools' list Euler's Totient Tool to compute Phi: the Euler Totient. Euler's Totient function φ(n) represents the number of integers inferior to n and coprime with n.
ResultsEuler's Totient - dCode
Tag(s) : Arithmetics
SharedCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Need Help ?Please, check our dCode Discord community for help requests!NB: for encrypted messages, test our automatic cipher identifier!
Message for dCode's team: Send this message!Feedback and suggestions are welcome so that dCode offers the best 'Euler's Totient' tool for free! Thank you!
Euler's Totient- Mathematics
- Arithmetics
- Euler's Totient
Euler's Totient Phi Calculator Phi(N)=?
Integer Number N= Calculate Phi(N)Display the list of numbers relatively prime with N
List Phi(N) See also: Prime Factors Decomposition — Coprimes — Divisors of a Number — RSA CipherSolver for Phi(?)=N (Inverse Phi)
Integer Number N= Calculate Phi(N)Answers to Questions (FAQ)
What is Euler's totient? (Definition)
Euler's totient function (or Euler's indicator), noted with the greek letter phi: $ \varphi(n) $ or $ \phi(n) $ an arithmetic function which associates with each strictly positive natural number $ n $, the number of natural numbers between 1 and $ n $ that are coprime with $ n $.
How to calculate phi(n) (Euler's totient)?
Phi(n) (euler indicator) is determined in several ways. The best-known calculation formula for determining the value of the Euler indicator uses the decomposition into prime factors of $ n $. Let $ p_i $ be the $ m $ distinct prime factors that are divisor or $ n $ (of multiplicity $ k $). Formula (1) is:
$$ \varphi(n) = \prod_{i=1}^m (p_i-1) p_i^{k_i-1} \quad\quad (1) $$
After simplification, another formula (2) is:
$$ \varphi(n) = n \prod_{i=1}^m \left( 1 - \frac{1}{p_i} \right) \quad\quad (2) $$
Example: For $ n = 12 $, only $ 1,\ 5,\ 7,\ 11 $ are coprime with $ 12 $ so $ \varphi(12) = 4 $. The prime factor decomposition of 12 is $ 12 = 2^2 \times 3^1 $
Formula (1) $$ \varphi(12) = \left( (2-1) \times 2^{2-1} \right) \times \left( (3-1) \times 3^{1-1} \right) = 2 \times 2 = 4 $$
Formula (2) $$ \varphi(12) = 12 \left( 1 - \frac{1}{2} \right) \left( 1 - \frac{1}{3} \right) = 12 \times \frac{1}{2} \times \frac{2}{3} = 12 \times \frac{2}{6} = \frac{24}{6} = 4 $$
How to calculate phi(n) if n is prime?
If $ n $ is a prime number, then $ \varphi(n) = n-1 $
How to calculate inverse phi(n)?
Solving $ \phi(x) = N $ requires an optimized search algorithm based on $ \phi(x) \geq \sqrt{\frac{x}{2}} $ that tests all values. More details here
What is Euler's totient for (Euler's theorem)?
Euler totient phi function is used in modular arithmetic. It is used in Euler's theorem:
If $ n $ is an integer superior or equal to 1 and $ a $ an integer coprime with $ n $, then $$ a^{\varphi(n)} \equiv 1 \mod n $$
Example: $ n=7 $ , $ a=3 $ and $ \varphi(7) = 6 $ so $ 3^6 = 729 \equiv 1 \mod 7 $
This theorem is the basis of the RSA encryption.
What are Euler's totient properties?
The Euler indicator is an essential function of modular arithmetic:
— A positive integer $ p $ is a prime number if and only if $ \varphi(p) = p - 1 $
— The value $ \varphi(n) $ is even for all $ n > 2 $
— $ \varphi(ab) = \varphi(a) \varphi(b) \frac{d}{\varphi(d)} $ with $ d $ the GCD of $ a $ and $ b $
— If $ a $ and $ b $ are coprimes (relatively primes), then $ \varphi(a \times b) = \varphi(a) \times \varphi(b) $
— If $ a $ divides $ b $ then $ \varphi(a) \mid \varphi(b) $
— If $ a $ is even, $ \varphi(2a) = 2 \varphi(a) $
— If $ a $ is odd, $ \varphi(2a) = \varphi(a) $
The sequence of values of Phi(n) is 1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8, 12, 10, 22, 8, 20, 12, 18, 12, 28, etc. here
What is the algorithm for phi(n)?
The Euler phi(n) calculation can be coded with an algorithm like:function phi(n) { r = n; for (i = 2; i*i <= n; i++) { if (n % i == 0) { r -= r / i; while (n % i == 0) { n /= i; } } } if (n > 1) r -= r / n; return r;}
❓ Ask a new questionSource code
dCode retains ownership of the "Euler's Totient" source code. Any algorithm for the "Euler's Totient" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Euler's Totient" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Euler's Totient" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app. Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
Cite dCode
The content of the page "Euler's Totient" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/euler-totient
In a scientific article or book, the recommended bibliographic citation is: Euler's Totient on dCode.fr [online website], retrieved on 2025-12-14, https://www.dcode.fr/euler-totient
Need Help ?
Please, check our dCode Discord community for help requests!NB: for encrypted messages, test our automatic cipher identifier!
Questions / Comments
Write a messageFeedback and suggestions are welcome so that dCode offers the best 'Euler's Totient' tool for free! Thank you!
- Euler's Totient Phi Calculator Phi(N)=?
- Solver for Phi(?)=N (Inverse Phi)
- What is Euler's totient? (Definition)
- How to calculate phi(n) (Euler's totient)?
- How to calculate phi(n) if n is prime?
- How to calculate inverse phi(n)?
- What is Euler's totient for (Euler's theorem)?
- What are Euler's totient properties?
- What is the algorithm for phi(n)?
- RSA Cipher
- Divisors of a Number
- Coprimes
- Prime Factors Decomposition
- Carmichael Number
- Binary Code
- LCM (Lowest Common Multiple)
- DCODE'S TOOLS LIST
- Paypal
- Patreon
- Cryptocurrencies
- Discord
- Contact
- About dCode
- dCode App
- Wikipedia
Từ khóa » Phi 231
-
PHI 231 Big Questions: Introduction To Philosophy - John Jay College
-
By Determining The Prime Factorization Of 231, Calculate \phi (231 ...
-
PHI 231 - The Big Questions: An Introduction To Philosophy - Coursicle
-
PHI 231 - The Philosophy Of Childhood - Acalog ACMS™
-
PHI 231 - Philosophy Of Language - Lehman College Course Catalog
-
PHI 231: Knowing, Doing And Being: Philosophical Method And Its
-
PHI 231 - History Of Ancient Philosophy - Acalog ACMS™
-
A1/231 PHI - CP Lighting
-
SEG 25:231 - PHI Greek Inscriptions
-
PHI Volume 60 Issue 231 Front Matter | Philosophy | Cambridge Core
-
PHI 231 - CUNY John Jay College Of Criminal Justice - Course Hero
-
Phi Phi Don Chukit Resort, Ko Phi Phi Don Reviews - Tripadvisor
-
PHILOSOPHY | Catalog - Harper College