A_k\right|-\ \cdots\ + \left(-1\right)^{n-1} \left|A_1\cap\cdots\cap A_n\right|. \end{align} Digit sum In mathematics , the digit sum of a given integer is the sum of all its digit s, (e.g.: the digit sum of 84001 is calculated as 8+4+0+0+1&nbsp;=&nbsp;13). Digit sums are most often computed using the decimal representation of the given number,