Skip to content

Applied Mathematics · Ch 1 — Numbers, Quantification and Numerical Applications

Simple Arithmetic Functions

1.3

Simple Arithmetic Functions

Recall from earlier classes that a function is a rule that assigns to every element of one set (the domain) exactly one element of another set (the range) — a kind of machine that converts an input, or pre-image, into a corresponding output, or image. For example, y=x2y = x^2 is a function in which xx is the pre-image and yy is the image.

A simple arithmetic function (also called a number-theoretic function) is a special case of this idea: its domain is restricted to the positive integers, while its range consists of real or complex numbers. Such functions are written as f:Z+→Rf : \mathbb{Z}^+ \to \mathbb{R}, and they exist to describe arithmetic properties of numbers — patterns like divisibility, primality, or coprimality — which makes them a core tool of number theory.

One widely used example is Euler's totient function, also called Euler's phi function and denoted ϕ(n)\phi(n). For a positive integer nn, ϕ(n)\phi(n) counts how many integers in the set {1,2,3,…,n}\{1, 2, 3, \ldots, n\} are coprime to nn — that is, numbers whose greatest common divisor (GCD) with nn equals 11.

ϕ(n)=∣{ k∈{1,2,…,n}:gcd⁡(k,n)=1 }∣\phi(n) = \big|\{\, k \in \{1, 2, \ldots, n\} : \gcd(k, n) = 1 \,\}\big|

Because it measures how many numbers up to nn share no common factor with nn, the totient function is a useful gauge of how "prime-like" a number's neighbourhood is, and it recurs throughout number theory and its applications.

Additive and multiplicative functions

Arithmetic functions are often classified by how they behave on a product of two coprime numbers:

  • A function ff is additive if f(xy)=f(x)+f(y)f(xy) = f(x) + f(y) whenever gcd⁡(x,y)=1\gcd(x, y) = 1. The logarithm is a familiar model, since log⁡(xy)=log⁡x+log⁡y\log(xy) = \log x + \log y.
  • A function ff is multiplicative if f(xy)=f(x)×f(y)f(xy) = f(x)\times f(y) whenever gcd⁡(x,y)=1\gcd(x, y) = 1. Euler's totient is multiplicative: φ(6)=φ(2)×φ(3)=1×2=2\varphi(6) = \varphi(2)\times\varphi(3) = 1 \times 2 = 2.

Properties of Euler's totient function

Three properties make φ(n)\varphi(n) easy to compute:

  1. If pp is prime, then φ(p)=p−1\varphi(p) = p - 1.
  2. If xx and yy are coprime, then φ(xy)=φ(x) φ(y)\varphi(xy) = \varphi(x)\,\varphi(y) (so φ\varphi is multiplicative).
  3. If n=xaybzc⋯n = x^{a} y^{b} z^{c}\cdots is written as a product of prime powers, then φ(n)=n(1−1x)(1−1y)(1−1z)⋯\varphi(n) = n\left(1 - \tfrac{1}{x}\right)\left(1 - \tfrac{1}{y}\right)\left(1 - \tfrac{1}{z}\right)\cdots

For example, 12=22×312 = 2^{2} \times 3, so φ(12)=12(1−12)(1−13)=12×12×23=4\varphi(12) = 12\left(1 - \tfrac12\right)\left(1 - \tfrac13\right) = 12 \times \tfrac12 \times \tfrac23 = 4.

The number-of-divisors function τ(n)\tau(n)

Denoted by the Greek letter τ\tau ("tau"), this function counts how many positive divisors nn has:

τ(n)=the number of positive divisors of n\tau(n) = \text{the number of positive divisors of } n

For instance τ(1)=1\tau(1) = 1, τ(3)=2\tau(3) = 2 (divisors 1,31, 3) and τ(12)=6\tau(12) = 6 (divisors 1,2,3,4,6,121, 2, 3, 4, 6, 12).

The divisor-sum function σ(n)\sigma(n)

Written with the Greek letter σ\sigma ("sigma"), this function adds up all the positive divisors of nn, including 11 and nn itself:

σ(n)=the sum of the positive divisors of n\sigma(n) = \text{the sum of the positive divisors of } n

So σ(3)=1+3=4\sigma(3) = 1 + 3 = 4 and σ(12)=1+2+3+4+6+12=28\sigma(12) = 1 + 2 + 3 + 4 + 6 + 12 = 28. For any prime pp the two functions take simple values, τ(p)=2\tau(p) = 2 and σ(p)=p+1\sigma(p) = p + 1, because a prime has exactly the two divisors 11 and pp.

The Mobius function μ(n)\mu(n)

The Mobius function, written with the Greek letter μ\mu ("mu"), records the prime-factor structure of nn using just three values:

μ(n)={0if n has one or more repeated prime factors,1if n=1,(−1)kif n is a product of k distinct primes.\mu(n) = \begin{cases} 0 & \text{if } n \text{ has one or more repeated prime factors},\\ 1 & \text{if } n = 1,\\ (-1)^{k} & \text{if } n \text{ is a product of } k \text{ distinct primes}. \end{cases}

For example, 12=22×312 = 2^{2} \times 3 has the repeated prime factor 22, so μ(12)=0\mu(12) = 0; while 35=5×735 = 5 \times 7 is a product of two distinct primes, giving μ(35)=(−1)2=1\mu(35) = (-1)^{2} = 1. Both τ(n)\tau(n) and σ(n)\sigma(n) are multiplicative functions, which lets each be evaluated one prime power at a time.

Illustration 8. For n=1n = 1, the only positive divisor is 11 itself, so

τ(1)=1andσ(1)=1.\tau(1) = 1 \qquad \text{and} \qquad \sigma(1) = 1.

Hence τ(n)=σ(n)\tau(n) = \sigma(n) when n=1n = 1 — the count of divisors and the sum of divisors coincide, because there is a single divisor and it equals 11.


Illustration 9. Complete the table for prime numbers nn, where τ(n)\tau(n) is the number of positive divisors and σ(n)\sigma(n) is their sum.

nn (prime)τ(n)\tau(n)σ(n)\sigma(n)
223
526
17218
29230

A prime nn has exactly two positive divisors, 11 and nn itself. Therefore, for every prime:

τ(n)=2andσ(n)=1+n=n+1.\tau(n) = 2 \qquad \text{and} \qquad \sigma(n) = 1 + n = n + 1. …

Figure 1.3A function shown as a machine that takes an input x (the pre-image) and produces an output y = f(x) (the image)
Fig. 1.3 — A function shown as a machine that takes an input x (the pre-image) and produces an output y = f(x) (the image)

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your NCERT textbook's own diagram.

A function pictured as a machine: it turns each input x into a single out …