Factorization of the semi-palprime $N = pq$

172 Views Asked by At

I define semi-palprime be a prime number that remains the prime when its digits are reversed, like $p = 13$, and its mate is $q = 31$. I know that number $N$,

$ N = \\40276504015957241212219140055284581853797537049211403507316894593383\\ 47457987912639871372112187693426311212748251225732519905589136273168\\ 20318858996928988487350273731350467362899934942766591227002091985684\\ 14312802147969417515545625068960627407674722275954470998513985249290\\ 2998963539890226770447590949818014983$

is the product of one semi-palprime number $p$ and its mate $q$, how I can factorize $N$?

1

There are 1 best solutions below

0
On

You work at both ends towards the middle; if you know the lower $n$ digits of $p$, you can immediately deduce the lower $n$ digits of $q$, as $q \equiv N p^{-1} \pmod{10^n}$

Similarly, if you know the upper $n$ digits of $p$, you have a bound on the upper $n$ digits of $q$, as if you know that $p$ is in the range $(p_0, p_1)$, then $q$ must be in the range $(N/p_1, N/p_0)$

So, look through the possible values of the lower two digits of $p$, deduce the corresponding lower two digits of $q$. Now, because the primes are mirror images of each other, this implies the upper two digits; check to see if the corresponding upper digits are compatible. Some will be, most won't be; reject the possibilities that aren't.

For the possibilities that are, then go through the possibilities for the third digit; repeat the execise until you meet in the middle.