# Concatenation divisible by 19

You are given a 9-digit number $a$. Let $b=a+1$.

Now, if you make a big number $N$ by concatenating $a$ and $b$, then $N$ is divisible by 19.

What is the number $a$?

• You meant- what is the maximum value of a(having nine digits)? Jul 17, 2018 at 23:29
• @MeaCulpaNay No. The 9-digit number $a$ is uniquely determined. Jul 18, 2018 at 0:12

For any $$a<999{,}999{,}999$$ we have $$b\le 999{,}999{,}999$$ which is 9 digits, too, so the $$a$$ part in the $$N$$ number is shifted by 9 decimal places. So $$N=10^9\cdot a+(a+1)=(10^9+1)a + 1 = 2{,}631{,}579\cdot 19\cdot a + 1$$ which is NOT divisible by $$19$$.

Let's try $$a=999{,}999{,}999$$ then. Hurray! We get $$b=1{,}000{,}000{,}000$$ and $$N=9{,}999{,}999{,}991{,}000{,}000{,}000 = 526{,}315{,}789{,}000{,}000{,}000\cdot 19$$

Hence $$a=999{,}999{,}999.$$

• Since $10^9 + 1$ is divisible by 19, $9999999991 = (10^9-1)10+1 = (10^9+1)10 - 19$ must be divisible by 19. Jul 18, 2018 at 0:15
• @P.-S.Park Yes, it must. And it actually is: $9999999991/19 = 526315789$. But how does it relate to my answer? Jul 25, 2018 at 12:57
• I just said that your answer can be confirmed without boring calculation 9999999991/19 =526315789. :-) Jul 25, 2018 at 14:58

Suppose some number $a \lt 999,999,999$ worked. We would have $10^9a+a+1=(10^9+1)a+1$ is divisible by $19$, but then at least one of $a+19$ and $a-19$ (whichever is still $9$ digits) would work just as well. We are given that $a$ is uniquely determined, so this is impossible. The only possibility is
$a=999,999,999, b=1,000,000,000, N=9,999,999,991,000,000,000$.
If the problem is well posed, this will be divisible by $19$. In fact it is.

• This answer is entirely based on "let's assume, without any particular reason, that the problem is well posed and also that the answer is unique". You can certainly use this kind of reasoning to arrive at an idea for a probable solution, but since this is a maths puzzle, you should base the result on actual maths rather than lateral thinking or literary analysis.
– Bass
Jul 18, 2018 at 7:08
• @Bass since this is posted on a puzzling stack rather than a maths stack, I would guess that this kind of answer is absolutely acceptable. Moreover, the technique of "let's first try this special case that would be very nice if it worked and then just validate if it does" is quite common in mathematics across all levels.
– J.E
Jul 18, 2018 at 7:52
• @J.E Trying special cases is all fine and good, but stopping right after that isn't. I know it wasn't the case here, but let's imagine for a moment that the correct answer had been, for example, "any nine-digit number works". The puzzle would still have been valid (showing an extremely interesting property of nine-digit numbers), but this answer would still look exactly the same. This indicates that the method used isn't a valid way to solve this problem.
– Bass
Jul 18, 2018 at 8:21
• @Bass Not really, since the question itself states that the answe should be only a singular number (not even discussing the uniqueness, which also helps), not any solution, but a single solution. If the question was stated differently, it seems wrong to assume that the solution would not change. Moreover, how can a method be logically correct, produce the right output and still be called invalid?
– J.E
Jul 18, 2018 at 8:32
• @J.E Since you asked: logical deduction is a prime example of a GIGO process: if even a single premise is questionable, any result gained by deduction will be coincidental at best. Here the suspect premise is "I can implicitly trust OP's apparent claim of the uniqueness of the answer, without verifying it to any extent", so this answer is good if and only if the question is good, a property which the accepted answer demonstrates, but this one doesn't.
– Bass
Jul 18, 2018 at 10:33