# From prime to prime by squaring the digits [closed]

I took prime $131$, squared digits of it and wrote them in natural order as they appear, from left to right, and obtained $191$, then I obtained $1811$ by the same procedure, and then $16411$ and then $1361611$, and $131,191,1811,16411$ are primes and $1361611$ is not.

To illustrate how to arrive at the next number in sequence from previous one, take, for example, $16411$.

We have: $1^2=1$ and $6^2=36$ and $4^2=16$ and $1^2=1$ and $1^2=1$ so we obtain $1361611$ from $16411$.

Can we generate in this way as large a number of different (to avoid loops like one that starts with $11$) primes as we want? Or there is some law/laws that do not allow that?

## closed as off-topic by Stopple, Stefan Kohl, Steven Landsburg, Max Alekseyev, Alexey UstinovDec 12 '17 at 6:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "MathOverflow is for mathematicians to ask each other questions about their research. See Math.StackExchange to ask general questions in mathematics." – Stopple, Stefan Kohl, Max Alekseyev, Alexey Ustinov
If this question can be reworded to fit the rules in the help center, please edit the question.

• This could serve as a question in recreational mathematics, but this forum is not the best for your question. Consider analyzing the (repeated) productions for each digit, and count the number of ones produced. My guess is that any number will lead to a fixed point (namely a binary looking number) or will encounter a multiple of 3. Gerhard "Others Aren't Ready To Play" Paseman, 2017.12.11. – Gerhard Paseman Dec 11 '17 at 18:44
• @AntoinePalAdeen Look at the numbers of occurences of each non-zero digit modulo $3$. You have a $9\times 9$ transition matrix $A$. The first question to ask is if for every $x\in\mathbb Z_3^9\setminus\{\pm(1,0,0,0,0,0,0,0,0)\}$ you can find $k$ such that $y^TA^k x=0$ in $\mathbb Z_3$ where $y=(1,-1,0,1,-1,0,1,-1,0)$. If so, the story is over (you are guaranteed to hit a multiple of $3$ except when you have all $1$'s in the beginning). If not, it gets interesting. So write a program and tell us the result. – fedja Dec 12 '17 at 6:25
• If this statement is true, it will be well beyond current technology to prove. For instance, since none of the squares of single digit numbers contains 7, this claim would imply that there are infinitely many primes that do not have 7 in their digit expansion. This has only been proven very recently by Maynard arxiv.org/abs/1604.01041 , and is highly non-trivial. This problem is significantly harder than that. – Terry Tao Dec 12 '17 at 16:26
• p.s. Actually, the claim would imply that there are infinitely many primes whose digit expansion has no 7s and only a bounded number of 0s, 2s, and 5s. This is already beyond the reach of Maynard's method at present (though potentially a refinement of his approach would eventually be able to establish this). – Terry Tao Dec 12 '17 at 16:31
• @AntoinePalAdeen Fortunately or unfortunately, there are $34$ non-trivial starting combinations that never hit a multiple of $3$. The simplest one is $12377$. So Gerhard was overly {opt/pess}imistic. – fedja Dec 13 '17 at 0:04