# Fungrim entry: c19cd6

$\varphi(n) = \# \left\{ k : k \in \{1, 2, \ldots, n\} \,\mathbin{\operatorname{and}}\, \gcd\!\left(n, k\right) = 1 \right\}$
Assumptions:$n \in \mathbb{Z}_{\ge 0}$
TeX:
\varphi(n) = \# \left\{ k : k \in \{1, 2, \ldots, n\} \,\mathbin{\operatorname{and}}\, \gcd\!\left(n, k\right) = 1 \right\}

n \in \mathbb{Z}_{\ge 0}
Definitions:
Fungrim symbol Notation Short description
Totient$\varphi(n)$ Euler totient function
Cardinality$\# S$ Set cardinality
Range$\{a, a + 1, \ldots, b\}$ Integers between given endpoints
GCD$\gcd\!\left(a, b\right)$ Greatest common divisor
ZZGreaterEqual$\mathbb{Z}_{\ge n}$ Integers greater than or equal to n
Source code for this entry:
Entry(ID("c19cd6"),
Formula(Equal(Totient(n), Cardinality(Set(k, ForElement(k, Range(1, n)), Equal(GCD(n, k), 1))))),
Variables(n),
Assumptions(Element(n, ZZGreaterEqual(0))))

## Topics using this entry

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2021-03-15 19:12:00.328586 UTC