MathLabs
TheoremProved

Alternating digit-sum test for divisibility by 11

Statement

Let nn have digits so that n=∑i=0kdi 10in = \sum_{i=0}^{k} d_i\,10^i. Then 11∣n11 \mid n if and only if 1111 divides the alternating digit sum ∑i(−1)idi\sum_i (-1)^i d_i.

Why is it true?

Unlike 99, powers of 1010 do not stay congruent to 11 modulo 1111 — instead they flip sign at every step, because 1010 itself is congruent to −1-1 modulo 1111. Digits at even positions contribute normally, odd positions contribute negatively.

Proof sketch

Step 1. Show by induction that 10i≡(−1)i(mod11)10^i \equiv (-1)^i \pmod{11} for every i≥0i\ge0. Base case i=0i=0: 100=1=(−1)010^0=1=(-1)^0. Inductive step: if 10i≡(−1)i(mod11)10^i\equiv(-1)^i\pmod{11}, then 10i+1=10⋅10i≡(−1)⋅(−1)i=(−1)i+1(mod11)10^{i+1}=10\cdot10^i\equiv(-1)\cdot(-1)^i=(-1)^{i+1}\pmod{11} (using 10≡−1(mod11)10 \equiv -1 \pmod{11}). So 10i≡(−1)i(mod11)10^i\equiv(-1)^i\pmod{11} for all ii.

Step 2. Substitute into the place-value expansion: n=∑idi10i≡∑idi(−1)i(mod11)n=\sum_i d_i10^i \equiv \sum_i d_i(-1)^i \pmod{11}, which is precisely the alternating digit sum ∑i(−1)idi\sum_i (-1)^i d_i.

Step 3. Conclude: 11∣n11\mid n exactly when n≡0(mod11)n\equiv0\pmod{11}, which by Step 2 happens exactly when 1111 divides ∑i(−1)idi\sum_i (-1)^i d_i.

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. David M. Burton (2010). Elementary Number Theory
  2. John H. Conway, Richard K. Guy (1996). The Book of Numbers · DOI:10.1007/978-1-4612-4072-3