Answer
See explanation
Work Step by Step
Let \( n \) be any nonnegative integer with decimal representation
\[
n = d_k 10^k + d_{k-1} 10^{k-1} + \cdots + d_1 10 + d_0,
\]
where each \( d_i \) (for \( i = 0, 1, \ldots, k \)) is a digit (0 through 9). Notice that
\[
10 \equiv 1 \pmod{3}.
\]
Raising both sides to any nonnegative integer power \( i \) yields
\[
10^i \equiv 1^i \equiv 1 \pmod{3}.
\]
Thus, we can write
\[
n = d_k 10^k + d_{k-1} 10^{k-1} + \cdots + d_1 10 + d_0 \equiv d_k + d_{k-1} + \cdots + d_1 + d_0 \pmod{3}.
\]
This congruence tells us that \( n \) and the sum of its digits have the same remainder when divided by 3. Consequently, if the sum of the digits of \( n \) is divisible by 3 (that is, if
\[
d_k + d_{k-1} + \cdots + d_1 + d_0 \equiv 0 \pmod{3}),
\]
then
\[
n \equiv 0 \pmod{3}.
\]
Thus, \( n \) is divisible by 3. This completes the proof.