Euler's Totient Function

College

Formula

φ(n)=npn(11p)\varphi(n) = n \prod_{p \mid n} \left(1 - \frac{1}{p}\right)

About

Euler's totient function φ(n) counts how many integers from 1 to n are coprime to n (share no common factors). It's fundamental in number theory and the basis of RSA encryption. Highlighted cells are coprime to n.

Controls

φ(30) = 8
n30

Integers coprime to 30:

1, 7, 11, 13, 17, 19, 23, 29