# Math Help - divisibility and factors

1. ## divisibility and factors

I have been told to write down any four digit number as long as at least one of the digits is different from the other three, but not show the number to my friend.

I write down the four digit number 6834.

My friend tells me to use those same difits and write them down in some different order to form another different four digit number. Again, my friend does not see this new number.

I write down the four digit number 3468.

My friend tells me to subtract the smaller number from the larger. (Again, my friend does not see)

I do 6834 - 3468 = 3366.

My friend tells me to circle one of the non zero digits of my answer.

I circle the 6 at the end of 3366, and again my friend does not see.

My friend tells me to take the three remaining digits and write them in some order to form a three digit number with those three digits.

I write 633.

Now my friend asks me to tell him the three digit number and i say 633.

My friend looks at the number and does some mental calculations and says to me "hey, you circled a 6.

a. How does my friend do this?

b. What application of mathematical principles does this justify? Explain carefully.

2. You initially think of a four digit number.

You choose $x=a\cdot10^3+b\cdot10^2+c\cdot10+d$.

You then 'jumble' up $x$ to get for example $x'=c\cdot10^3+a\cdot10^2+d\cdot10+b$

Set $n=x-x'$, therefore $n=(a-c)\cdot10^3+(b-a)\cdot10^2+(c-d)\cdot10+(d-b)$.

Let's now look at $n$ modulo $9$:
$n \equiv (a-c)\cdot1^3+(b-a)\cdot1^2+(c-d)\cdot1+(d-b) = 0\mod{9}$.

Now here's the trick: You take away one of the digits of $n$ and you friend guesses it! How you ask? Well it has to do with $n$ being divisible by $9$. A divisibility test for $9$ says a number is divisible by $9$ if and only if the sum of the digits is divisible by $9$.

So if $n=efgh$ and you remove $g$ for instance your friend will in a sense solve for $g$. He solves $e+f+h+g\equiv 0\mod{9}$. Thus he sees $g\equiv -e-f-h\mod{9}$.

There is a bit of a flaw in this trick though: if the number you circled was either $0$ or $9$, he has a $50\,\%$ chance of guessing it right, otherwise he'll get it right every time!

3. hey thanks chip, but this seems to be a little over my head. i guess i dont understand the modulo nine stuff. how did he get from my 633 to guessing my 6?

also it was pointed out that i had to circle a non-zero digit

4. Originally Posted by ihavvaquestion
hey thanks chip, but this seems to be a little over my head. i guess i dont understand the modulo nine stuff. how did he get from my 633 to guessing my 6?

also it was pointed out that i had to circle a non-zero digit
The unknown digit, we'll call it $x$, satisfies $6+3+3+x=9n$, for some $n$

So we get $x=9n-12$... but we know $x$ lies in between $1$ and $9$, so $n=2$ is the only number that works here.

Thus $x=9\cdot2-12 = 6$.

5. okay, so i think i get it. as long as i circle any non zero digit...the remaining 3 digits plus whatever number i circle have to add up to a multiple of nine...correct?

is there an easy way of explaining why?

6. ok i understand how he is getting my number now. and i understand up until the point of x-x'=n. i guess my question is how do i know that x-x' will always give a number that is divisible by 9?

7. Originally Posted by ihavvaquestion
ok i understand how he is getting my number now. and i understand up until the point of x-x'=n. i guess my question is how do i know that x-x' will always give a number that is divisible by 9?
Let's look at $\frac{n}{9}$:

$\frac{n}{9}=\frac{(a-c)\cdot10^3+(b-a)\cdot10^2+(c-d)\cdot10+(d-b)}{9}$

Now, $10^3=9\cdot111+1,\;10^2=9\cdot11+1,\;10=9\cdot1+1$, so

$\frac{n}{9} = 111\cdot(a-c)+\frac{a-c}{9}+11\cdot(b-a)+\frac{b-a}{9}+1\cdot(c-d)+\frac{c-d}{9}+\frac{d-b}{9}$

Rearranging terms, we see $\frac{n}{9} = 111\cdot(a-c)+11\cdot(b-a)+(c-d)+\frac{a-c+b-a+c-d+d-b}{9}$
$= 111\cdot(a-c)+11\cdot(b-a)+(c-d)\in\mathbb{N}$

Hence $n$ is divisible by $9$.

8. hey chip588...

i understand this:

Now, , so

but how do get from that to:

it looks like i should plug in

but i cant follow how you did that...did you skip a step i cant see?

9. Right, I did plug that in:

$\frac{(a-c)\cdot10^3}{9} = (a-c)\frac{10^3}{9} = (a-c)\frac{9\cdot111+1}{9} = (a-c)\left(111+\frac19\right)$ $= 111\cdot(a-c)+\frac{a-c}{9}$

The other terms of $n$ follow the same way.

10. ok thanks...i understand that now...one more thing...what does this mean?

that symbol and the N???

sorry, but this stuff is new to me

11. Originally Posted by ihavvaquestion
ok thanks...i understand that now...one more thing...what does this mean?

that symbol and the N???

sorry, but this stuff is new to me
This is a 'mathy' way of saying that number is a positive integer.

$\in$ means contained in.

$\mathbb{N}$ is the set of natural numbers i.e. $\mathbb{N} = \{0,1,2,3,4,5,\cdots\}$.

$x\in\mathbb{R}$ reads: $x$ is contained in the real numbers.

12. so n/9

how does this say that n is always divisible by 9?

13. Originally Posted by ihavvaquestion
so n/9

how does this say that n is always divisible by 9?
This shows that there exists an integer $x$ such that $\frac{n}{9} = x \implies n=9\cdot x$, this means $n$ is divisible by $9$.

14. okay i think i finally get it

so if n/9

then n= 999(a-c) + 99(b-a) + 9(c-d), which will always be divisible by nine...right?

15. Originally Posted by ihavvaquestion
okay i think i finally get it

so if n/9

then n= 999(a-c) + 99(b-a) + 9(c-d), which will always be divisible by nine...right?
Correct!