Palindromic representation in base $x$ and Integer factoring

66 Views Asked by At

If $n \in \mathbb{Z}$ is representable as the product of two palindromic integers in base $x$. i.e.,

$$ \begin{align} n &= (x^4+px^3+qx^2+px+1)(x^4+rx^3+sx^2+rx+1) \newline &=x^8+x^7 (p + r)+x^6 (p r + q + s)+ x^5 (p (s + 1)+ q r + r) \newline & + x^4 (2 p r + q s + 2) + x^3 (p (s + 1)+ q r + r) \newline &+ x^2 (p r + q + s)+ x (p + r)+ 1 \newline &=x^8+ax^7+bx^6+cx^5+dx^4+cx^3+bx^2+ax+1, \end{align} \tag{1} $$

then $n$ itself is a palindromic integer in base $x$ such that

$$ \begin{align} a &=p+r \newline b &=pr+q+s \newline c &=ps+qr+p+r \newline d &=2pr+qs+2. \end{align} \tag{2} $$

For a base-$x$ representation, the condition $0 \le a,b,c,d \lt x$ holds. We relax this condition and let $a,b,c,d$ be any integer and call such a representation as a palindromic extended base-$x$ representation.

Suppose we are given an odd integer $n$ and we want to find a palindromic extended base-$x$ representation of degree-$8$ as given in Eqn. (1) with $a, b, c, d, x \in \mathbb{Z}.$ How would we go about that?

Approach tried so far: Treating $a,b,c,d$ as variables and $x$ as a parameter, we have

$$(x^8+1)+a(x^7+x)+b(x^6+x^2 )+c(x^5+x^3 )+dx^4=n$$

i.e.,

$$a(x^7+x)+b(x^6+x^2 )+c(x^5+x^3 )+dx^4=n-x^8-1 \tag{3}$$

i.e.,

$$x|(n-x^8-1)$$

  1. $x=1$ divides $n-x^8-1$. Therefore, $x=-1$ also divides $n-x^8-1$.
  2. Since $n$ is odd, $x=2$ gives $n-2^8-1$, an even number which is divisible by $2$. Therefore, $x=-2$ also divides $n-2^8-1$.

i.e., $x \in \{\pm 1, \pm 2\}$ gives us a system of equations

$$ \begin{align} 2a+2b+2c+d &=n-2 \newline -2a+2b-2c+d &=n-2 \newline 130a+66b+40c+16d &=n-257 \newline -130a+66b-40c+16d &=n-257 \newline \end{align} \tag{4} $$

However, this doesn't necessarily give us integer solutions for $a, b, c, d$.

How does one choose $x$ so that we get integer solutions for $a,b,c,d$ in Eqn. $(3)$?

Bonus question: Suppose we choose $x$ such that $a,b,c,d$ are integers. What is the necessary and sufficient condition such that $p, q, r, s$ are integers? Note that this is equivalent to a factoring method for $n$.

Related:

Solving a particular system of Diophantine equations

Factoring palindromic polynomial

1

There are 1 best solutions below

0
On

Let $n\in\Bbb{Z}$ be given. You want to find $p,q,r,s,x\in\Bbb{Z}$ such that $$n=(x^4+px^3+qx^2+px+1)(x^4+rx^3+sx^2+rx+1).$$ Taking $x=1$ simplifies this to $$n=(2p+q+2)(2r+s+2),$$ and so we may take any factorization $n=uv$ and any $p,r\in\Bbb{Z}$ and set $$q:=u-2p-2\qquad\text{ and }\qquad s:=v-2r-2.$$