Euler Phi in LaTeX (\varphi(n))

φ(n)\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.

aφ(n)≡1(modn)a^{\varphi(n)} \equiv 1 \pmod{n}
\documentclass{article}
\begin{document}
Euler Phi: $\varphi(n)$

\[ a^{\varphi(n)} \equiv 1 \pmod{n} \]
\end{document}

Related symbols

All 정수론 →

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.
Math poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기