1

Let $D$ be the function define as $D(b,n)$ be the sum of the base-$b$ digits of $n$.

Example: $D(2,7)=3$ means $7=(111)_2\implies D(2,7)=1+1+1=3$

Define $S(a,m)=1^m+2^m+3^m+...+a^m$ where $a,m\in\mathbb{Z}_+$

How do you show that

$D(a,S(a,m))=1+D(a,S(a-1,m))$?

Pruthviraj
  • 2,697

1 Answers1

1

You defined

$$S(a, m) = \sum_{i=1}^{a}i^{m} \tag{1}\label{eq1A}$$

and you ask to show

$$D(a,S(a,m)) = 1 + D(a,S(a-1,m)) \tag{2}\label{eq2A}$$

From \eqref{eq1A}, note for $a \gt 1$ that $S(a,m) \gt a^m$ and

$$\begin{equation}\begin{aligned} S(a, m) & \lt \sum_{i=1}^{a}a^{m} \\ & = a\left(a^m\right) \\ & = a^{m+1} \end{aligned}\end{equation}\tag{3}\label{eq3A}$$

Thus, in base $a$, you have

$$S(a,m) = \sum_{i=0}^{m}b_i a^i, \; 0 \le b_i \le a - 1 \text{ for } 0 \le i \le m - 1, \text{ and } 1 \le b_m \le a - 1 \tag{4}\label{eq4A}$$

Note $S(a-1,m) = S(a,m) - a^m$, so its base $a$ representation would be the same as that for $S(a,m)$, i.e., as shown in \eqref{eq4A}, except that it's corresponding coefficient for $a^m$ would be $1$ less, i.e., $b_m - 1$. As such, since $D(b,n)$ is

the sum of the base-$b$ digits of $n$

you can see using \eqref{eq4A} that the LHS & RHS of \eqref{eq2A} are

$$D(a,S(a,m)) = \sum_{i=0}^{m}b_i \tag{5}\label{eq5A}$$

$$\begin{equation}\begin{aligned} 1 + D(a,S(a-1,m)) & = 1 + (\sum_{i=0}^{m-1}b_i + (b_m - 1)) \\ & = 1 + (\sum_{i=0}^{m}b_i - 1) \\ & = \sum_{i=0}^{m}b_i \end{aligned}\end{equation}\tag{6}\label{eq6A}$$

Since the LHS & RHS values are the same, this shows \eqref{eq2A} always holds.

John Omielan
  • 52,653