# The sum of digits of $3(3x+3)$ is always $9$ for any $x$ between $1$ and $9$

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$)?

• $9$ divides a number, iff it divides the digital root of the number. – Mankind Jun 21 '15 at 16:29
• Other people using crappy titles doesn't entitle you to do the same. – bjb568 Jun 21 '15 at 16:34
• 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. – Adam Hughes Jun 21 '15 at 16:35
• I started a meta thread to discuss the titling. – Milo Brandt Jun 21 '15 at 16:46
• 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. – 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.

• It definitely makes the brute force approach far more comprehensible, though it definitely feels quite... ungeneric. – David Mulder Jun 21 '15 at 16:37
• @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. – Mark Viola Jun 21 '15 at 16:40
• Yeah, definitely true, I guess I was chasing two different birds and trying to hit them with the same stone: Not gonna work. – 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$.

• 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. – David Mulder Jun 21 '15 at 16:38
• @David See casting out nines for the arithmetical essence of the matter. – Bill Dubuque Jun 21 '15 at 16:50
• @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. – A.P. Jun 21 '15 at 16:54