0
$\begingroup$

This is a trick I learnt in primary school, but never gave it much thought. Here's how I formulate it: $$ n = \sum_{j=0}^{m} x_j 10^{m-j} $$ is a decimal expansion of some integer $n$ such that $$ \sum_{j=0}^{m} x_j = r $$ such that $3|r$, then $3|n$. Or, $r= 3k$ and $n=3i$ with $k \neq i$. I thought about it for some time, but didn't get any intuition.

$\endgroup$

marked as duplicate by Bill Dubuque elementary-number-theory Nov 29 '16 at 17:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Write, e.g., $234=2(99+1)+ 3(9+1)+4\cdot1 = (2\cdot 99+3\cdot 9) +(2+3+4)$. $\endgroup$ – David Mitra Oct 16 '16 at 9:17
  • $\begingroup$ This is a special case of casting out nines - see the linked duplicate. Also you had "divides" in the wrong order: e.g. $n$ is even iff $2$ divides $n\ $ (not $n$ divides $2)\ $ $\endgroup$ – Bill Dubuque Nov 29 '16 at 17:49
1
$\begingroup$

Hint. Take the difference $$n-r = \sum_{j=0}^{m} x_j (10^{m-j}-1)$$ and note that $3$ (but also 9) divides $(10^{m-j}-1)$.

$\endgroup$
  • $\begingroup$ OK, so it boils down to expanding the decimal term: $10^{m-j} = (1+9)^{m-j} = \sum_{i=0}^{m-j} 9^{i}$, then all terms but one are multiples of 3 and the first term is $x_j$ for all $j$, hence the sum. Thanks! $\endgroup$ – Alex Oct 16 '16 at 11:44
  • 1
    $\begingroup$ @Alex Yes! That's right. $\endgroup$ – Robert Z Oct 16 '16 at 11:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.