# What is this digital operation called?

I've recently come across an operation that has interesting ties to the digital root operation. Instead of finding the sum of all digits, one would find the difference between each digit, repeating this until a single number is obtained. One would then find the digital root of this single number. For example:

$1937$

$9-1=8, 3-9=-6, 7-3=4$

$(-6)-8=-14, 4-(-6)= 10$

$10-(-14)=24$

Now for the digital root of the single number, $24$:

$2+4=6$

(I apologize for the poor formatting)

Is there a specific name for this operation? If not, what would be a proper mathematical description?

-
What do you mean by "digital root"? –  Pedro Tamaroff Jun 28 '12 at 16:33
This operation is not well-defined yet. On the second step you have $(-14)10$ and you subtract the former from the latter. On the next step you have $24$ - should you stop there, or you should subtract $4-2$? And if you should subtract, why did you add? –  Ilya Jun 28 '12 at 16:34
@PeterTamaroff en.wikipedia.org/wiki/Digital_root –  Cocopuffs Jun 28 '12 at 16:40
@Ilya the last step with the single number, 24, is where I'm taking the digital root. I didn't indicate that earlier. Edited. –  TreyK Jun 28 '12 at 17:20
@TreK: What is the purpose of this? –  Arturo Magidin Jun 28 '12 at 17:28

Call your function $f$ and the digital root $d$. Let's "letter the digits" of a the argument. (ex. 1937 would be $abcd$ with a=1, b=9, c=3 and d=7) If we just plug in our digits and simplify we get... $$f(a) = d(a) \\ f(ab) = d(b-a) \\ f(abc) = d(c-2b+a) \\ f(abcd) = d(d-3c+3b-a)$$ Binomial coefficients with alternating sign?

-
$$(-1)^k \binom{n}{k}$$ –  draks ... Jun 28 '12 at 22:18

This is a fuller explanation of what axblount discovered empirically.

You have a positive integer $n=\sum_{k=0}^ma_k10^k$, where $a_m\ne 0$. Think of the digits as elements of a sequence $\langle a_0,\dots,a_m\rangle$. Your basic operation is applying the forward difference operator and changing the sign.

Your first derived sequence is therefore $\langle-\Delta a_0,\dots,\Delta a_{m-1}\rangle$.

Now in general we have $\Delta(-x_k)=-x_{k+1}-(-x_k)=x_k-x_{k+1}=-\Delta x_k$, so $-\Delta(-x_k)=\Delta x_k$, and your second derived sequence is $\langle\Delta^2 a_0,\dots,\Delta^2a_{m-2}\rangle$. Your third is $\langle -\Delta^3a_0,\dots,-\Delta^3a_{m-3}\rangle$, and in general the $n$-th is $\big\langle(-1)^n\Delta^na_0,\dots,(-1)^n\Delta^na_{m-n}\big\rangle$. In particular, your final single value, before taking the digital root, is $(-1)^m\Delta^ma_0$.

Now it’s well-known (and easily proved by induction) that in general

$$\Delta^n x_k=\sum_{i=0}^n(-1)^i\binom{n}ix_{k+n-i}\;,$$

so

\begin{align*} (-1)^m\Delta^ma_0&=(-1)^m\sum_{i=0}^m(-1)^i\binom{m}ia_{m-i}\\ &=(-1)^m\sum_{i=0}^m(-1)^{m-i}\binom{m}ia_i\\ &=\sum_{i=0}^m(-1)^i\binom{m}ia_i\;. \end{align*}

This is the number whose digital root you take in the final step.

-