Skip to content
Theorem

A number is congruent to its digit sum modulo

Arithmetic • Number System • Divisibility

Formula

For any positive integer with digits : , because and so every power of is . The same congruence holds modulo .

How to use it

  1. 1Repeat the digit sum until one digit remains; that digital root is the remainder modulo , except that a root of means remainder .
  2. 2Use it to reduce a huge base before raising it to a power modulo .
  3. 3It is the source of the familiar tests: exactly when divides the digit sum, and exactly when does.

Worked example

What is the remainder when is divided by ?

Step-by-step

  1. 1

    Why: Sum the digits.

  2. 2

    Why: Repeat until a single digit remains.

  3. 3

Answer

Watch out

Only moduli and work this way, because only for those is . Modulo the digits must be taken with alternating signs, and for any other modulus the digit sum says nothing at all.

Builds on

Also known as

digit sum, casting out nines, divisibility by 9, digital root, digit sum modulo 9

Appears in past papers

2020 (II)

2020 (I)

2019 (I)

2018 (II)

2017 (I)