In math everything you do has always to be consistent with the rules of logic. But the real goal of math is finding structure inside the logic. Usually finding problems with interesting patterns is not a direct process. You start at a problem and then find a solution which raises new interesting questions and then leads to a new problem with a solutions which yields an even wider range of interesting questions and on we go.

Here is a fun simple puzzle that I got from a reddit forum which got me rabbit hole-ing:

**Problem 1:** *Given a number with six digits where the 1st digit is the same as the 4th and the 2nd digit is the same as the 5th digit and the 3rd digit is the same as the 6th digit. Is this number always divisible by 13?*

Note that divisible means that if we divide the number by a given integer then we end up with an integer. Here are some examples which indicate that the statement is true: 123123 = 13 x 9471, 456456 = 13 x 35112, 112112 = 13 x 8624. Some we have some evidence that the statement is true and indeed it is. We can prove this by writing the statement in an algebraic expression. Write the the three consecutive digits as a_{1},a_{2},a_{3}. Then a_{1}a_{2}a_{3}a_{1}a_{2}a_{3} can be written as

a

_{1}x 10

^{5}+ a

_{2}x 10

^{4}+ a

_{3}x 10

^{3}+ a

_{1}x 10

^{2}+ a

_{2}x 10

^{1}+ a

_{3}

which can be rewritten as

a

_{1}x 10

^{2}(1+ 10

^{3}) + a

_{2}x 10

^{1}(1+ 10

^{3}) + a

_{3}x (1+ 10

^{3}) = (a

_{1}+ a

_{2}+a

_{3}) x (1+ 10

^{3})

Now observe that 1+ 10

^{3}= 1001 which is divisible by 13. Therefore, the statement is true.

So how about if we consider only 4 digits with 2 repeating digits. Well, 1212 is not divisible by 13. So what can we say about this setting?

**Problem 2:** *Given a number with four digits where the 1st digit is the same as the 3rd and the 2nd digit is the same as the 4th digit. What is the resulting number divisible by?*

We can repeat the previous proof procedure. We write a_{1}a_{2}a_{1}a_{2} in powers of 10:

a

_{1}x 10

^{3}+ a

_{2}x 10

^{2}+ a

_{1}x 10

^{1}+ a

_{2}= a

_{1}x 10

^{1}(1 + 10

^{2}) + a

_{2}(1 + 10

^{2})

= (a

_{1}+a

_{2}) x (1 + 10

^{2})

So for arbitrary a

_{1},a

_{2}this number will be divisible by whatever 1 + 10

^{2}is divisible by. Now we can come up with a general statement.

**Problem 3:** *Given a number with 2N digits where the 1st digit is the same as the (1+N)th and the 2nd digit is the same as the (2+N)th digit etc. What is the resulting number divisible by?*

We can repeat the trick again. We write the number a_{1}a_{2}...a_{N}a_{1}a_{2}...a_{N} then write it in powers of 10 and we find that it can be written as

(a

_{1}+ a

_{2}+ ... + a

_{N})(1+ 10

^{N})

So we see that for the general setting the numbers is divisible by 1+ 10^{N}.

We could stop there. But another question comes to light what can we say about the number 1+ 10_{N}. In the original problem we actually were looking at a divisor of 1+ 10_{N}. So let's investigate if we can say something about when 1+ 10^{N} has a divisor other than itself. Or in other words

**Problem 4:** *Are there conditions on N for which 1+ 10 ^{N} is not prime?*

Suppose that N = 2^{k}m with m is odd. Then we write

10

^{N}mod 10

^{2k}+1 = 10

^{2km }mod 10

^{2k}+1 = - 10

^{2k(m-1) }mod 10

^{2k}+1 = 10

^{2k(m-2) }mod 10

^{2k}+1 = ... = (-1)

^{ m }mod 10

^{2k}+1

But recall that m is odd. So we obtain the equality

10

^{N}mod 10

^{2k}+1 = -1 mod 10

^{2k}+1

which means that 10

^{N}+ 1 is divisible by 10

^{2k}+1 under the conditions that N = 2

^{k}m with m odd which is a pretty neat result as it means that there are infinitely N for which the number is not prime.

This is very much a mathematics research goes. You start somewhere keep following your curiosity. So what I really wanted to say is that doing Mathematics is very much like being a cat =^..^=

**Cat tax**