0

In an answer to Cyclic numbers are characterized by the reciprocals of full reptend primes? a user states that the sum of the digits of a number in base b is given as below:

$\frac{b^d-1}{b-1}s= \frac{d(d+1)}{2}n \ \text{where} \ s=d\frac{b-1}{2}\frac{(d+1)n}{b^d-1}\in\mathbb{N}$

I am not able to see how to arrive at this formula for $s$. Kindly provide me some insight.

Thanks!

cabmetric
  • 181
  • 1
  • 9

1 Answers1

1

Using the example from the original question, the argument is that

$$\begin{aligned} 1 \times 142857 &= 142857 &= 1\times 10^5 + 4\times 10^4 + 2\times 10^3 + 8\times 10^2 + 5\times 10 + 7\times 1\\ +2 \times 142857 &= 285714 &= 2\times 10^5 + 8\times 10^4 + 5\times 10^3 + 7\times 10^2 + 1\times 10 + 4\times 1\\ +3 \times 142857 &= 428571 &= 4\times 10^5 + 2\times 10^4 + 8\times 10^3 + 5\times 10^2 + 7\times 10 + 1\times 1\\ \vdots & \quad & \vdots\\ \downarrow & \quad & \downarrow\\ =\color{blue}{\frac{d(d+1)}{2}n} &= 2999997 &= (1+4+2+8+5+7) \times 111111 = 27 \frac{10^6-1}{10-1} = \color{blue}{s \frac{b^d-1}{b-1}} \end{aligned} $$

user3733558
  • 1,218