Euler Phi in LaTeX (\varphi(n))
- LaTeX command
\varphi(n)- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Euler's totient: how many integers from 1 to n are coprime to n, using the curly phi.
Euler's theorem a^{\varphi(n)} \equiv 1 \pmod n for \gcd(a, n) = 1 and the product formula \varphi(n) = n\prod_{p \mid n}(1 - 1/p) are the standard appearances. \varphi gives the open, looped form, while \phi gives the form with a straight stroke through a circle; both name the same function, and the choice is house style. Many number theory texts pick \varphi so that \phi stays free for other uses, such as the golden ratio or an angle. RSA key generation uses \varphi(pq) = (p-1)(q-1).
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Euler Phi: $\varphi(n)$
\[ a^{\varphi(n)} \equiv 1 \pmod{n} \]
\end{document}Related symbols
All Teori Nombor →Frequently asked questions
- How do I write Euler Phi in LaTeX?
- Type \varphi(n) in math mode, for example $a^{\varphi(n)} \equiv 1 \pmod{n}$. It works in plain LaTeX without loading any package.
- Which package do I need for \varphi(n)?
- None. \varphi(n) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \varphi(n) in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\varphi(n)$ in running text.
Editor LaTeX AI Terbaik, Alternatif Overleaf
Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI
- Jana diagram TikZ yang cantik menggunakan AI
- Muat naik imej dan tukar ke LaTeX dengan lancar
- Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan