# Are there infinitely many Mama's numbers and no Papa's numbers?

Just playing with square numbers, I made an interesting observation.

$$11\times 11=121$$ $$12\times 12=144$$ $$13\times 13=169$$ $$.$$ $$.$$ $$.$$ $$20\times 20=400$$ $$21\times 21=441$$ $$.$$ $$.$$ $$.$$.

So, we will go from left to right and take two number to form a new number from the square numbers I listed above. For example from the number $$169$$ we can make three numbers $$16,19,69$$ but numbers $$61,91,96$$ are not allowed. Similarly for four digit numbers like $$2401$$ we are allowed to take $$6$$ numbers which are $$24,20,21,40,41,01$$ but we are not allowed to count $$42,02,12,04,14,10$$.

Now, look at the number $$289$$. It is square of $$17$$. We see that we can select three two digit numbers $$28,89,29$$. Notice that $$28$$ is composite while $$89$$ and $$29$$ are primes.

Next notice the number $$256$$. It is square of $$16$$. We can select three two digit numbers $$25,26,56$$ all of which happen to be composite.

So, now we are in the position to have definitions:

A Mama's number is a number $$x>10$$ such that all the two digit combinations of numbers chosen from $$x^2$$ from left to right are composite. Some trivial examples of Mama's numbers are $$24$$ as $$24^2=576$$ and $$28$$ as $$28^2=784$$.

Next:

A Papa's number is a number $$y>10$$ such that all the two digit combinations of numbers chosen from $$y^2$$ from left to right are primes.

The numbers which contain a prime as well as a composite in two digit combinations from left to right are neither Mama's nor Papa's numbers.

I checked from $$1$$ to $$50$$ by hand and sadly I found no Papa's numbers. While several Mama's numbers were $$15,16,18,20,22,24,25,28,30,38,40$$.

Now, I have two questions:

1. Are there infinitely many Mama's numbers?
2. Is there any Papa's number?

I hope I made myself clear. I beg you to point out if there are any errors in calculations or typos (or edit them yourself).

Thanks.

• I think $2\cdot 10^n$ is a Mama's number, right? So there are infinitely many. – M. Winter Sep 28 '17 at 13:47
• @VidyanshuMishra Ofcourse not, you can't put a vague and unrelated title just because you like it. Act civilly and give me a good reason why you need that specific title and I won't edit it. – A---B Sep 28 '17 at 19:29
• Whoa! You seriously thought "Are there infinitely many Mama's numbers and no Papa's" was an acceptable title when Mama and Papa numbers were term you made up yourself and no-one else has heard of? Do you go to bars and get angry when the bartender doesn't know the name of a drink your friend made up the night before? – fleablood Sep 28 '17 at 21:04
• That other people do crappy titles does not make your title any less crappy. – fleablood Sep 29 '17 at 7:26
• The title looks fine to me. To fully explain what you're looking for would make much too long a title. Alternatively, your title could be, "If we define two kinds of numbers in the way described below, are there infinitely many of the first kind and none of the second kind?" That would not introduce any undefined terms. On the other hand that's exactly how I interpreted the title you chose. Since I have never heard of Mama's numbers or Papa's numbers, I expected you to define them in the question body. Since you did that, I am happy. – David K Sep 29 '17 at 14:46

Square numbers have final digit $0,1,4,5,6,9$ and of these only $1,9$ are admissible as the final digit of a two digit prime.

The penultimate digit of any square ending in $1$ or $9$ is even. But that means there will always be an even admissible two digit combination made up of the first digit and the penultimate digit. Therefore no Papa's numbers exist.

Further to comments, the fact that the penultimate digit is even is most easily seen by noting that odd squares are $\equiv 1 \bmod 4$. Since $100$ is divisible by $4$, this equivalence depends only on the last two digits of any decimal number. If $10r+1 \equiv 1\bmod 4$ we have $2r\equiv 0\bmod 4$ i.e. $r$ is even. Likewise for $10r+9$.

In fact we could use $\equiv 1\bmod 8$ but this adds nothing really and just complicates things.

• Could you show why "the penultimate digit of any square ending in 1 or 9 is even"? I suppose simple enumeration will show it, but I hope there's a more insightful explanation. – alexis Sep 28 '17 at 17:39
• @alexis: If $n^2$ ends in 1 or 9, $n = 10m + 1, 3, 7, \text{ or } 9$ for some $m$. Taking one of these cases: if $n = 10m + 7$, $n^2 = 100 m^2 + 140 m + 49 = 100 m^2 + (14m + 4)*10 + 9$. The tens digit will then be the last digit of $14m + 4$, which will be even. Similar proofs hold for the other three cases. (There's still a bit of enumeration to this proof, but it's better than calculating all possible squares mod 100). – Michael Seifert Sep 28 '17 at 17:47
• @alexis Note added to answer. – Mark Bennet Sep 28 '17 at 18:10
• @MichaelSeifert Thanks for your note - I've added my own take on this as a note. (I discovered my thought process while answering another question on this site!) – Mark Bennet Sep 28 '17 at 18:11

Converting some comments to an answer on the Mama number front, with credit mainly to user M. Winter, if $M$ is a Mama's number, then $10M$ is also a Mama's number, which gives various infinite families. Three other infinite families are

$$2\cdot10^n+2\\ 10^n-1\\10^n-3$$

I'm making this community wiki so that others can add to it.

Here are three more infinite families, generalizing the family $2\cdot10^n+2$. Let $\mathcal{M}_{\{0,2\}}$ be the set of Mama's numbers with digits $0$ and $2$. If $m\in\mathcal{M}_{\{0,2\}}$, then for all sufficiently large $n$ (basically exceeding the number of digits in $m$), $$10^n+m\\2\cdot10^n+m\\4\cdot10^n+m$$

are Mama's numbers. Moreover, $2\cdot10^n+m\in\mathcal{M}_{\{0,2\}}$ (for large $n$).