Tuesday, 19 August 2014

summation - Digit-sum division check in base-$n$




Several years ago now I realised that for any natural numbers $x$ and $y$ you could write $$x^y=(x-1) \left(\sum_{i=0}^{y-1}x^i\right)+1$$
This shows that $x^y-1$ will always be divisible by $x-1$, which after a bit of deliberation I realised meant that in any base a quick check for divisibility could be employed for divisors that are factors of the base number ${} - 1$ (hence $3$ and $9$ in base $10$) by adding the digits until only one digit was left and checking if that digit was divisible by the divisor.



I wrote the above formula and use in back of my maths book when I started high school (probably when I should have been listening to the teacher!) and completely forgot about it, until I was looking through my old book the other day and saw it. Now I'm wondering what the general version of this formula is (say for all integers), and what other uses it has beside division checks. If anyone could point me in the right direction I would be very grateful.


Answer



To be honest, I think there is a way to expand this for $x,y\in\mathbb{R}$.



Start by dividing,



$$\frac{x^y-1}{x-1}=?$$




Basically, we have some polynomial of the form $x^y-1$ set equal to $0$, and $x=1$ is one obvious root. The other roots can be found be dividing the said factors, and we result with



$$\frac{x^y-1}{x-1}=\Pi_{n=2}^{y}(x-r_n)$$



Where $r_n$ is the $n$th root. Interestingly, with Euler's formula, we can find a nice closed form solution for $r_n$,



$$r_n=e^{n\pi i}=\cos(n\pi)+i\sin(n\pi)$$



And looking a little bit further, I see you found the summation formula for a geometric series,




$$\sum_{n=0}^xa^n=\frac{a^{n+1}-1}{a-1}$$



We may derive this solution in numerous ways, one way being Perturbation methods, which I will not explain here, but an example is here. Just replace all of the $10$'s with $x$, and you derive your solution.



Lastly, I note that my formula for $\frac{x^y-1}{x-1}$ stops looking pretty when $y\in\mathbb{R}$, so I would stick to the summation formula.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...