Skip to content

Arithmetic Functions

Definition. An arithmetic function is a function f:Z>0→Cf: \mathbb{Z}_{>0} \to \mathbb{C}.

The subject studies how these functions interact with factorisation. Two operations:

  • Pointwise addition: (f+g)(n)=f(n)+g(n)(f + g)(n) = f(n) + g(n).
  • Dirichlet convolution: (f∗g)(n)=∑d∣nf(d) g(n/d)(f * g)(n) = \sum_{d \mid n} f(d)\, g(n/d).

Convolution is commutative and associative, with identity ε(n)=1\varepsilon(n) = 1 if n=1n = 1 else 0. A function is multiplicative if f(mn)=f(m)f(n)f(mn) = f(m)f(n) whenever gcd⁡(m,n)=1\gcd(m, n) = 1; the central property: a multiplicative function is determined by its values on prime powers.

φ(n)\varphi(n) (see Fermat, Euler and Wilson) is multiplicative, which proves the product formula:

n=p1e1⋯pkek  ⟹  φ(n)=∏i=1kpiei−1(pi−1).n = p_1^{e_1} \cdots p_k^{e_k} \;\Longrightarrow\; \varphi(n) = \prod_{i=1}^{k} p_i^{e_i - 1}(p_i - 1).

Why. φ(pe)=pe−pe−1\varphi(p^e) = p^e - p^{e-1} (the non-coprime residues are exactly the pe−1p^{e-1} multiples of pp), and multiplicativity handles coprime factors. Example: φ(360)=φ(23)φ(32)φ(5)=4⋅6⋅4=96\varphi(360) = \varphi(2^3)\varphi(3^2)\varphi(5) = 4 \cdot 6 \cdot 4 = 96.

The divisor function τ(n)\tau(n) counts positive divisors; σ(n)\sigma(n) sums them. For n=∏piein = \prod p_i^{e_i}:

τ(n)=∏i(ei+1),σ(n)=∏ipiei+1−1pi−1.\tau(n) = \prod_{i} (e_i + 1), \qquad \sigma(n) = \prod_{i} \frac{p_i^{e_i + 1} - 1}{p_i - 1}.

Why. Divisors choose one power of each prime; the geometric-series sum arises from multiplying out ∏(1+pi+pi2+⋯+piei)\prod (1 + p_i + p_i^2 + \cdots + p_i^{e_i}).

Both are multiplicative. nn is perfect when σ(n)=2n\sigma(n) = 2n; the even perfect numbers are exactly 2p−1(2p−1)2^{p-1}(2^p - 1) with 2p−12^p - 1 prime (Euler, and the Mersenne connection).

μ(n)={1n=10p2∣n for some prime p(−1)kn is a product of k distinct primes\mu(n) = \begin{cases} 1 & n = 1 \\ 0 & p^2 \mid n \text{ for some prime } p \\ (-1)^k & n \text{ is a product of } k \text{ distinct primes} \end{cases}

Key identity: ∑d∣nμ(d)=ε(n)\sum_{d \mid n} \mu(d) = \varepsilon(n) (1 at n=1n=1, else 0). The inversion theorem:

g(n)=∑d∣nf(d)⟺f(n)=∑d∣nμ(d) g(n/d).g(n) = \sum_{d \mid n} f(d) \quad\Longleftrightarrow\quad f(n) = \sum_{d \mid n} \mu(d)\, g(n/d).

Classical application. Since ∑d∣nφ(d)=n\sum_{d \mid n} \varphi(d) = n, Möbius inversion recovers φ(n)=n∑d∣nμ(d)/d\varphi(n) = n \sum_{d \mid n} \mu(d)/d; the product formula drops out of the number-theoretic machinery instead of being assumed.

A standard exam theorem:

∑d∣nφ(d)=n.\sum_{d \mid n} \varphi(d) = n.

Proof. Partition the fractions kn\frac{k}{n}, 1≤k≤n1 \leq k \leq n, by reduced denominator: each reduces to ad\frac{a}{d} in lowest terms with d∣nd \mid n, gcd⁡(a,d)=1\gcd(a, d) = 1; and there are exactly φ(d)\varphi(d) of those for each dd. The classes exhaust the nn fractions. ■\blacksquare

Problem 1. Compute τ(720)\tau(720), σ(720)\sigma(720) and φ(720)\varphi(720).

720=24⋅32⋅5720 = 2^4 \cdot 3^2 \cdot 5:

  • τ(720)=5⋅3⋅2=30\tau(720) = 5 \cdot 3 \cdot 2 = 30
  • σ(720)=(31)(13)(6)=2418\sigma(720) = (31)(13)(6) = 2418
  • φ(720)=720(1−12)(1−13)(1−15)=720⋅415=192\varphi(720) = 720(1 - \tfrac12)(1 - \tfrac13)(1 - \tfrac15) = 720 \cdot \tfrac{4}{15} = 192

Problem 2. How many gcd⁡(a,720)=5\gcd(a, 720) = 5 pairs… i.e. how many integers 1≤a≤7201 \leq a \leq 720 satisfy gcd⁡(a,720)=5\gcd(a, 720) = 5?

gcd⁡(a,720)=5\gcd(a, 720) = 5 iff a=5ba = 5b with gcd⁡(b,144)=1\gcd(b, 144) = 1 and 5∤b5 \nmid b. Count b≤144b \leq 144, gcd⁡(b,144)=1\gcd(b, 144) = 1, 5∤b5 \nmid b: φ(144)=48\varphi(144) = 48 coprime values, of which those with 5∣b5 \mid b… inclusion–exclusion: multiples of 5 that are coprime to 144: b=5cb = 5c, c≤28c \leq 28, gcd⁡(c,144)=1\gcd(c, 144) = 1: count coprime cc to 144 up to 28 directly = 13. So 48−13=3548 - 13 = 35 values of bb, giving gcd⁡(a,720)=5\gcd(a, 720) = 5 for exactly 35 integers.

  • Multiplicativity needs coprimality: τ(12)=6≠τ(4)τ(3)=3⋅2=6\tau(12) = 6 \neq \tau(4)\tau(3) = 3 \cdot 2 = 6 holds by luck (44 and 33 are coprime ✓); but τ(8)=4≠τ(4)τ(2)=3⋅2=6\tau(8) = 4 \neq \tau(4)\tau(2) = 3 \cdot 2 = 6 fails because 8=4⋅28 = 4 \cdot 2 share the factor 2.
  • σ\sigma vs σ0\sigma_0: some books write σk\sigma_k with σ=σ1\sigma = \sigma_1, τ=σ0\tau = \sigma_0. Read conventions carefully.
  • Möbius values are 0 exactly when nn is divisible by a square; “square-free with kk prime factors” gives (−1)k(-1)^k.