## Monday, 18 August 2014

### Analysis for Realsies: 2

Hey guys! This post is based on a little variant of question 5c. on last week's Tute A sheet. In particular, you were told that a three-digit number is divisible by $$3$$ if and only if the sum of its digits add up to a multiple of $$3$$. If you were in my tute, I should have pointed out to you that your proof works also for divisibility by $$9$$, and that this fact is true for any integer - not just three-digit ones. Now, instead of playing around with divisibility by 3, we're going to have a play around with divisibility by 11. =P

I think that it's a little odd that (ever since your first kindergarten lesson on factorising quadratics) we're so adept at factorising algebraic objects like: \begin{align} x^2-y^2=(x-y)(x+y), \end{align} and yet most of us never think to use the above completing-the-square formula on actual numbers...to simplify computations. For example: \begin{align} 6.79^2-3.21^2=(6.79-3.21)(6.79+3.21)=3.58\times 10=35.8 \end{align}

And along the same vein of thought, some of you know that if you expand $$(x+y)^n$$, you get something of the form: \begin{align} x^n+nx^{n-1}y+{n\choose 2}x^{n-2}y+\ldots+y^n.\end{align} But maybe you've never thought to apply it to actual numbers to get something like: \begin{align} 10^k=(11-1)^k=11^k+k\cdot11^{k-1}\cdot(-1)+{k\choose2}\cdot11^{k-2}\cdot(-1)^2+\ldots+(-1)^k.\end{align} So, one consequence of this is that any power $$10^k$$ of $$10$$ can be written as \begin{align}11\times\text{something}+(-1)^\text{k}.\end{align}
So, now let's take a $$n$$-digit number like $$\overline{a_na_{n-1}\ldots a_1}$$, then we know that this number can be written as the following sum:\begin{align}a_n10^n+a_{n-1}10^{n-1}+\ldots+a_1.\end{align} Now, invoking our earlier observation about powers of $$10$$, this sum can be written as: \begin{align} 11\times\text{some big nasty sum of integers}+a_n(-1)^n+a_{n-1}(-1)^{n-1}+\ldots+a_1(-1)^0.\end{align} Since \begin{align} a_n(-1)^n+a_{n-1}(-1)^{n-1}+\ldots+a_1(-1)^0 \end{align} is just \begin{align} a_0-a_1+a_2-a_3+\ldots+(-1)^na_n,\end{align} so to figure out if a number is divisible by $$11$$, you can just take its last digit, minus the second last, add the third last, minus the fourth last...etc., and if the number that you wind up with is divisible by $$11$$, then the entire thing is.

Let's try this out on an actual number! Let's take $$80586$$. Well, $$6-8+5-0+8=11$$ is totes divisible by $$11$$. Sooo, $$80586$$ should also be divisible. And it totes is: $$80586=11\times 7326.$$

The algebra in the previous paragraph might have been a tad on the messy side, but I think that you should all be fine with it! =)