Does digit $6$ always lead to $\ 25921=161^2\ $

elementary-number-theoryfactorialnumber theoryprime numberssquare-numbers

Consider prime numbers with the property that the product of the factorials of the digits plus $1$ is a perfect square, for example the prime $$30241$$ leads to the square $$3!\cdot 0!\cdot 2!\cdot 4!\cdot 1!+1=17^2$$

If the prime number starts with digit $6$, the only square seems to be $\ 25921=161^2\ $ which appears if the prime contains of one digit $6$ , two digits $3$ and the rest digits $0$ or $1$.

Is another square possible, when the prime starts with digit $6$ ? To this, we would need factorials below $10!$ , at least one of them $6!$ , such that their product plus $1$ is a perfect square , other than $6!\cdot 3!\cdot 3!+1$

Best Answer

A comment on strategy too long for the comment section, but not a complete answer:

You want to find $6!\prod a_i! +1=x^2$ where $a_i$ are single digits. Note that the single digits are $0,1,2,3,2^2,5,2\cdot 3,7,2^3,3^2$, so the factorials will all either be $1$ or will have only the prime factors $2,3,5,7$.

Rearranging, $6!\prod a_i!=x^2-1=(x-1)(x+1)$. LHS is even, so $(x-1)\ \text{and}\ (x+1)$ are both even. Successive even numbers have only a single factor of $2$ in common.

$2^2\cdot3^2\cdot5\cdot\prod a_i!=\frac{(x-1)}{2}\frac{(x+1)}{2}$. RHS are two consecutive numbers; hence their gcd is $1$. So the first problem is to find consecutive numbers which only have prime factors of $2,3,5,7$, and none in common.

$161$ leads to a solution because $\frac{161-1}{2}=80=2^4\cdot 5;\ \frac{161+1}{2}=81=3^4$.

$17$ leads to a solution (although not for the $6$ question) because $\frac{17-1}{2}=8=2^3;\ \frac{17+1}{2}=9=3^2$.

Finding candidate consecutive numbers will not necessarily lead to a solution, as the numbers of various prime factors will have to be distributable among the $a_i!$, which might prove difficult if (for example) the number of factors of $2$ is less than the number of factors of $3$ in the consecutive numbers. If consecutive numbers can be found that satisfy that requirement, then identifying suitable $a_i$ will be possible, and as OP points out, it should then be possible to generate a prime starting number by strategic insertion of digits $0,1$.

Related Question