Digit sum (source code)

= Digit sum

= Digital sum
{synonym}

= Sum of digits
{synonym}

The digit sum of a <nonnegative integer> in a given base is the sum of its <numerical digits>. In base $b$, replacing each power $b^j$ by $1$ shows that the <integer> and its digit sum are congruent <modulo> $b-1$.