0
$\begingroup$

Let $n \in \mathbb{N}$ be a natural number, with $a(n)$ denoting the amount of digits of $n$ and $s(n)$ being the sum of the digits of $n$. Are there some statements that we can make about $s(n)$? Obviously it is bounded above by $9a(n)$ but I wondered whether there are any interesting properties regarding this function. Example of such a statement: $3 \mid s(n) \iff 3 \mid n$.

  • 0
    For the number of digits we have, when $\text{n}\in\mathbb{N}^+$: $$\text{a}\left(\text{n}\right)=1+\lfloor\log_{10}\left(\text{n}\right)\rfloor$$2017-01-04
  • 0
    how does $27 \mid 27 \implies 27 \mid (2+7)$?2017-01-04
  • 0
    Hint:a number is divisible by 3 if the sum of its digits(in decimal) is a multiple of 3.2017-01-04
  • 0
    $s(n)$ is *not* bounded below by $a(n)$, eg, $10000$.2017-01-04
  • 0
    @Joffan thanks. changed it2017-01-04
  • 0
    In general, if we are working in base $b$ and $d$ is a divisor of $b-1$, then, for any $n\in\Bbb{N}$ we have $d\mid s(n)\Longleftrightarrow d\mid n$.2017-01-04

2 Answers 2

2

Here are just a few. I hope they're the type of thing you're looking for.

1: In general, if we are working in base $b$ and $d$ is a divisor of $b-1$, then, for any $n\in\Bbb{N}$ we have $d\mid s(n)\Longleftrightarrow d\mid n$.

2: If you have two positive integers in base $b$, $n$ and $m$, then: $$\frac{s(n)+s(m)-s(n+m)}{b-1}$$ Is the amount of times you have to carry when adding $n$ and $m$.

3: When working in base $b$: $$\forall n\in\Bbb{N}:\sum_{k=0}^{b^n-1}s(k)=\left(\frac{b(b+1)}{2}\right)\left(\frac{b^n-1}{b-1}\right)$$

1

A curiosity, some formula for $S(n) = \max\,\{ s(k) \,|\, k\le n\}$.

This $S$ is useful in famous problems like finding $s(s(s(4444^{4444})))$ where you have to majorate $s(n)$ multiple times.

Here are some examples :

  • $S(56)=s(49)=13$
  • $S(12345)=s(9999)=36$
  • $S(377)=s(299)=20$

$S$ steps at each numbers of the form $a999...9$ for $a=0,1,2,...,9$ and this allows to find a formula for it. The subtlety is the presence of $(n+1)$ because of the numbers at which the step arises.

$\forall k\le n$ we have $s(k)\le s(n_0)=S(n)$ where $n_0=\lfloor \frac{n+1}{10^{a(n+1)-1}}\rfloor\times 10^{a(n+1)-1} - 1$.

Note that it also works for single digit $n<10$.

Finding $n_0$ manually is quite simple, but if you want to automate this task with computer, no need to manipulate a string of digits thanks to the formula. Yet, I admit this is not a very deep result. :p