Personal story of an arithmetic puzzle.

A few days ago, an old study buddy sent me an email asking about a math problem. A minute later, I took my phone, snapped a picture of a notepad and attached the photo as a reply, along with my phone number.
Minutes later, I heard the ringtone: -Gerardo, did you become a genius? It took you 2 minutes to solve the problem!
No, I told my interlocutor. It's like those videos where a person, from the end of a basketball court, takes a single shot and scores. We know that, in general, those videos are somewhat "deceptive," since the person tried 300 times and only scored the last one, which is the only one shown. In this case it's the same: I knew the problem beforehand, I had been trying to solve it for several days and finally succeeded. The photo is the result of a process that cost me effort and time, it didn't take me just two minutes. No, I'm not a genius.
Then, my buddy asked me to tell him my story with this problem. I fulfill it with this post, as it may be of interest to readers.
First, it's worth knowing what the problem posed in the email was:
"Gerardo: I'm asking you about a mathematical puzzle to see what you come up with.
From the expression 12^n + 11, demonstrate when it can or cannot generate prime numbers.
What I've thought so far is this:
12^1 ends in 2
12^2 ends in 4
12^3 ends in 8
12^4 ends in 6 and then this cycle repeats, since 12^5 ends in 2 and so on.
So, in principle, I could divide the problem into 4 cases."In the first case, the result is prime. In that case, there's nothing to prove. As you will remember, to prove that a number IS prime you would have to prove that it has no proper divisors and run a loop from i=3 to the square root of the input, only for odd numbers (i+=2). And the larger the input, the larger the loop. So we will only prove something when the value of the expression is NOT prime, since in those cases, it's enough to prove that the expression has at least one proper divisor.
Therefore, in the first case, it is prime. In the second, since it ends in 4 and we add 11, the sum will end in 5 and in such cases it cannot be prime. We can generalize this every 4 powers, since the same will happen with 12^6, 12^10, etc.
But when I get to 12^3, I already know that adding 11 gives a composite value, because it can be factored as 37*47. However, can this be proven deductively? Or perhaps to "prove" it we can only do it by brute force, testing with different values, for example using MOD to see if the input (1739) has a remainder of zero, that is, a loop or enumeration of cases: 1739 mod 3, 1739 mod 5... until the remainder is zero, which only happens with 1739 mod 37?
A person at my job tells me that's not necessary, that it can be proven logically and deductively, and I don't see how. What do you think?"
My answer was the following image:

Note: sometimes we use an asterisk to denote multiplication instead of a small x, and other times we do it only with a centered dot, as seen in the notepad image. The expression 12^n means the number 12 raised to the power n. In all cases, it's worth clarifying, the statement implies that n belongs to the Natural numbers or positive integers.
PREVIOUS HISTORY
A few months ago, I went to read the blog Gaussianos. I don't remember if I chose to read a random post or if in some recent entry there was a link to an earlier post, but in any case I arrived at this entry: A COUPLE OF PROBLEMS ON NUMBER THEORY.
There, a problem very similar to the one presented to me by this acquaintance is proposed:

One way to solve that problem is the following:
Powers of 14 have this characteristic: if the exponent is even, the result ends in 6; if it is odd, it ends in 4. This is because 14x14 necessarily ends in 6, since 4x4=16; and then if we multiply a number ending in 6 by 14, the result will end in 4, since 6x4=24. And this will iterate. So the problem can be divided into two parts, one of which is very simple. If 14^n (when n is odd) is a number whose last digit is 4, adding 11, the result will end in 5 and such numbers cannot be prime, since every number ending in 5 is a multiple of 5.
We are left with the other "half" of the problem: when n is even. In such cases, this happens:
14^2=196. If we divide 196 by 3, the remainder is 1. This can be expressed as:
196 is congruent to 1 mod 3. (This is called "modular congruence")
In that case, if I add 2 to that number (198), then it will be a multiple of 3, meaning that 196+2 is congruent to 0 mod 3.
Therefore, 14^n +2 (when n is even) is a multiple of 3.
9 is also a multiple of 3.
If I add both numbers, the result must also be a multiple of 3. That's why, 14^n+2+9=14^n+11 must be 0 mod 3.
As usual, the same problem can be solved in other ways. But having said that, we could now elaborate other similar puzzles.
What happens with 15^n+11?
Easy: powers of 15 always end in 5. Adding 11 they will end in 6, and since such numbers are even, they cannot be primes.
What if it were 13^n+11?
Just as easy: powers of 13 are all odd: they end in 3, 9, 7, 1. If I add an odd number (11) to an odd number, the result will be even.
But, what happens with 12^n+11?
That's how I arrived at this problem. From another very similar one I read in an old post on a brilliant Spanish blog.
My development of the problem was similar to my friend's, although it should be clarified:
12^1 ends in 2 and adding 11 the result is prime (23).
But 12^5 also ends in 2 and adding 11 the result is composite (it is a multiple of 7).
Another clarification, which I mentioned to my friend in the phone call, is the following:
In my solution about 12^3 I indicate:
(37*48)-37 = 37*47
This is true, as anyone could verify by doing the math, but why?
They teach us that, since multiplication is commutative, the order of the factors does not change the product, which is true.
But it is good to think of multiplication in terms of sums, in which case there would be a difference between doing it one way or another. Let's see:
37*48 we can think of as "adding 48 thirty-seven times," that is: 48+48+48+48... 37 times.
And 48*37 as "adding 37 forty-eight times," that is: 37+37+37+37... 48 times.
If I do the latter but at the end subtract 37, it's the same as adding 37 about 47 times, instead of 48.
BACKSTAGE: BEHIND THE SCENES
Here I show two other pages from my notebook. On the first we see some notes I made about characteristics of these numbers. At the top right we see the last note of that day, which was key.

On the next page we see how I used that piece of information to "solve" the problem. At that moment I was satisfied. But the next day I thought it wasn't a good solution because it involved "pulling a fact out of a hat." Couldn't it be deduced?

And so, after several attempts, I arrived at a solution that seems good enough, no?
From what has been said, perhaps readers might want to think:
What happens with 12^7+11? Will the same thing happen as with 12^3+11?
What happens with 12^4+11 or 12^8+11?
Ultimately, if we were looking for a general multi-solution, is it possible to find it? Is 12^1+11 an exception?
SOMETHING MORE ABOUT POWERS AND "THE REMAINDER"
In the previous example, we said that 14^2 is 1 mod 3, meaning that when dividing 196 by 3, 1 is left over.
Does this happen for every 14^n (when n is even)?
We can deduce it:
Let's say I have something I can divide into 14, for example, 14 pieces of bread.
If I wanted to group those pieces in 3s I would have 4 groups of 3 and 2 pieces would be left over.
If I multiplied the previous by 14 (that is, 14^2), I would have 2*14=28 left over, but those pieces I can group into 9 groups of 3, and only 1 will remain.
If I multiplied that by 14, there would be 14 pieces left over which I can regroup into 4 groups and I will have 2 left over again (14^3).
And if I multiplied the result again, I would have another 28 left over, which I could regroup so that only 1 remains (14^4).
In this way we can know that every even power of 14 is congruent to 1 mod 3; while for odd exponents they will be congruent to 2 mod 3. Therefore, in all even cases, 14^n+2 will be a multiple of 3.
CURIOSITIES
1739 is not Ramanujan's taxi number, but it is also interesting, as it appears in 24 lists of the OEIS.
Both 12^3 (1728) and 12^3+11 (1739) are part of the sequence (A060980) for which the absolute value of the sum of the first digit minus the second plus the third minus the fourth is equal to 12.
That is:
|1-7+2-8|=12
|1-7+3-9|=12
The number 1739 is also included in another sequence (A142463) for which the number results from the equation:
a(n) = (2*n^2) + (2*n) - 1 for n=29
And from other sequences, among them, (A098603) for which:
a(n) = n*(n+10), for n=37, as had already been demonstrated initially, since 1739=37*47.
CONCLUSION
The problems posed are simple. To solve them, you don't need to know calculus or algebra. Basic arithmetic is enough. The Fundamental Theorem of Arithmetic says there are two classes of numbers: composite and prime. And the former can be composed, in a unique way, by factoring into primes.
You don't need to be a genius to tackle these problems. Anyone with basic high school knowledge is capable. 'Modulo congruence' I don't think is taught in school, but the modulo function is used in programming to know if one number is a multiple of another.
Mathematics is very useful for discovering what reality is like: it is used extensively in astronomy, physics, as well as in social sciences.
But they are also a great pastime. It's a toy without batteries, free and suitable for all ages.
Some will use more advanced mathematics: polynomials, complex numbers, derivatives...
Like sudokus and logic puzzles, mathematics, even the simplest, can be entertaining and help us learn to think. It's about being creative to find solutions with the given rules.
Some say we discovered this toy and others that we invented it. But no one found these rules written in stone when coming down from a mountain. We had to work to create them. That's why there are still conjectures, open problems. And it's quite likely that, if other civilizations exist, they have other systems. This marvelous puzzle that is mathematics requires imagination to know how to fit the pieces so that the resulting image is appropriate, beautiful, elegant☉
For the initial image I used the page: https://www.fotoefectos.com/.


