Given the following 'joke' I stumbled across today

It's easy enough to figure out that the answer is always 9. Asshole. However when I tried to 'prove' this for friends in an easy manner I stumbled upon two problems. First of all I had to add the different parts, which I wasn't able to do with 'simple' maths, so I used $\lfloor \frac{x}{10} \rfloor + x \mod 10$. Due to the jump in mathematical functions I had no idea how to continue with 'pure mathematics' so I wanted to get WolframAlpha to simply do the work for me and spit out the number 9, but I wasn't able to get it to work only within $1\leq x \leq 9,\ x \in \mathbb{Z} $.

Either way, practically speaking I have

$\lfloor \frac{(x \times 3 + 3) \times 3}{10} \rfloor + ((x \times 3 + 3) \times 3 \mod 10)\ \ \ where\ 1\leq x \leq 9,\ x \in \mathbb{Z}$

How would one solve this, either using normal mathematics or how to get this inputted in WolramAlpha in a way it will be understood (here is the WA link without the restriction on $x$)?

  • $\begingroup$ $9$ divides a number, iff it divides the digital root of the number. $\endgroup$ – Mankind Jun 21 '15 at 16:29
  • 1
    $\begingroup$ Other people using crappy titles doesn't entitle you to do the same. $\endgroup$ – bjb568 Jun 21 '15 at 16:34
  • 1
    $\begingroup$ I have to agree with the op on this one: the most up-voted question on this site is entitled "Can I use my powers for good?" If you think it should be closed because of the title, then vote to close rather than starting an edit war, but users who can review know that there is a "reject edit because it clearly conflicts with the author's intent," so the MSE community holds that up highly. $\endgroup$ – Adam Hughes Jun 21 '15 at 16:35
  • $\begingroup$ I started a meta thread to discuss the titling. $\endgroup$ – Milo Brandt Jun 21 '15 at 16:46
  • $\begingroup$ I wasn't sure about the title. But I'm sure about forcefully ending an edit war. You managed to get the question locked in 25 minutes, which is kind of an achievement. Take the fighting to the meta thread (link's in Meelo's comment). Nothing to see or do here. It is LOCKED. A CM has visited the question. Their word will be FINAL. $\endgroup$ – Jyrki Lahtonen Jun 21 '15 at 16:50

You can show them that they are adding the digits of multiples of $9$ between $18$ and $90$ and then just list them.

$18 \implies 1+8=9$

$27\implies 2+7=9$

$36\implies 3+6=9$

$45\implies 4+5=9$

$54\implies 5+4=9$

$63\implies 6+3=9$

$72\implies 7+2=9$

$81\implies 8+1=9$

$90\implies 9+0=9$

While this approach is not sophisticated, it might be fit-for-purpose when discussing with those who are not mathematically inclined.

  • $\begingroup$ It definitely makes the brute force approach far more comprehensible, though it definitely feels quite... ungeneric. $\endgroup$ – David Mulder Jun 21 '15 at 16:37
  • 1
    $\begingroup$ @DavidMulder Well, for those less mathematically inclined, sometimes a more general approach doesn't connect. We are therefore left with keeping things simple and more specific. $\endgroup$ – Mark Viola Jun 21 '15 at 16:40
  • $\begingroup$ Yeah, definitely true, I guess I was chasing two different birds and trying to hit them with the same stone: Not gonna work. $\endgroup$ – David Mulder Jun 21 '15 at 16:42

For any integer $k$, $3(3k+3)=9(k+1)$ is a multiple of $9$, and one can prove that such a number has digital root $9$.

  • $\begingroup$ This was I guess the answer I was looking for, even if it helps me less in communicating it. In the end this is the same thing as taking a good look at the puzzle and just seeing that the answer is always 9. I guess it's just the programmer in me that wishes to have a model like that, and then running the calculations till I get the answer I am looking for. $\endgroup$ – David Mulder Jun 21 '15 at 16:38
  • $\begingroup$ @David See casting out nines for the arithmetical essence of the matter. $\endgroup$ – Bill Dubuque Jun 21 '15 at 16:50
  • $\begingroup$ @DavidMulder Since you wrote $\mod{10}$ I suppose that you are familiar with modular arithmetic. Given a natural number $n$ and the fact that $10 \equiv 1 \pmod{9}$ you can prove (in a fairly straightforward way) that $n$ is congruent to the sum of its digits, modulo $9$. Since here $n = 9(x+1)$ has two digits it doesn't take much to spell the proof out for your friends that don't know about modular arithmetic. $\endgroup$ – A.P. Jun 21 '15 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.