> Can a natural number be *nontrivially* [palindromic](https://en.wikipedia.org/wiki/Palindromic_number) in **more than** $3$  consecutive number bases? 
> 
> *Nontrivially* means that I'm not counting one-digit palindromes.

*Was initially asked on [MSE](https://math.stackexchange.com/questions/2234587/can-a-number-be-palindrome-in-4-consecutive-number-bases) - but wasn't solved, and still isn't.*

Smallest number $N$ which is nontrivially palindromic in $x$ consecutive number bases:


$$
\begin{array}{|c|}
\hline
x& N & \text{Palindrome} \\ \hline
1& 3 & 11_2 \\ 
2& 10 & 101_3=22_4\\ 
3& 178 & 454_6 =343_7 = 262_8\\ 
4&  ?& \\ \hline
\end{array}
$$

Solution for $x=4$ probably does not exist;

One idea I had is to rely on these observations *(taken in short, from below)*: 

-  $(1)$ That $3$ digit numbers will never be palindromic in four consecutive bases , where by 3 digits I mean the 3 digits when written in the consecutive palindromic bases.

- $(*)$ all numbers palindromic in $3$ out of $4$ (including first and last in those three) consecutive bases (and not divisible by the other one) have $3$ digits in those bases, except the $2$ observed exceptions so far. *(see last paragraph at the end of the post)* - in other words, a solution for $x\ge4$ should have $3$ digits in its palindromic bases, if it exists.

But I do not know how to show (prove) these observations to be true.

> If $(1)$ and $(*)$ are true, they contradict each other,  thus $x\ge4$ does not have a solution.

----------

<br>

$$\text{Looking at consecutive palindromes in three bases}$$

We can look at patterns for $3$ consecutive bases.

It was [shown](https://math.stackexchange.com/q/2244067) on MSE for the 3 digit pattern, those solutions won't extend to a fourth base, which isn't hard to see. If only we could also show that these are the only solutions (including the one exception), then $(1)$ is true.

The patterns for other digits so far seem to follow with similar patterns.


> $(0)$ Lets start by excluding even length palindromes ($2p$ digits,
> $p\in\mathbb N$) since they can't be palindromic in consecutive number
> bases. This follows directly from the fact that a palindrome in base
> $b$ is divisible by $b+1$.
> 
> *(To be more precise, I consider base $b$ for digits and bases $b+1,b+2,\dots$ for additional consecutive bases; Example of $10=101_3=22_4$
> is contained as $3$ digit example for $x=2$ consecutive bases in those two bases.)*
> 
> 
> Following that, then we choose to observe odd digit length palindromes
> of $2d+1$ digits, $d\in\mathbb N$, which are palindromic in $3$ consecutive number bases $b\in\mathbb N \ge 2$, and we have so far ($x=3$):

<br>
$$\text{ 3 digit examples } (d=1)$$

Pick ($n=2k+3, k\in\mathbb N$), then we get a new example for every $n$, of form:  

$$\frac{1}{2}(n^3 + 6n^2 + 14n + 11)$$

Which is palindromic in bases $n+1, n+2, n+3$. 

Other than these, we have one more example: $300 = 606_7 = 454_8 = 363_9$

> $(1)$ How to show (prove) that all 3 digit examples other than $300$ are in
> this pattern?  <br> 
> 
> (No new exceptions or patterns exist for [$b\lt2333$](), so far.
> [Verified here](https://drive.google.com/open?id=19U-fsbBUsvrYw5MQpzRVVDeXrDlz6NEF) using [python code](https://drive.google.com/open?id=1gPLJZwXWT-OYZC07amwd1qmshPa9w9De))

*You can see that the first pattern emerges at number base $b=6$, and no new patterns emerge for the next $2300$ number bases, which makes the existence of a second pattern (or more exceptions) very unlikely.*


<br>
$$\text{ 5 digit examples } (d=2)$$

Pick ($n=4k+40, k\in\mathbb N$), then we get a new example for every $n$, of form:  

$$\frac{1}{4}(3n^5 + 30n^4 + 125n^3 + 270n^2 + 307n + 148)$$

Which is palindromic in bases $n+1, n+2, n+3$; No other examples (exceptions) exist.

> $(2)$ How to show (prove) that all 5 digit examples are in
> this pattern?  <br> 
> 
> (No exceptions or new patterns exist for [$b\le333$](), so far.
> [Verified here](https://drive.google.com/open?id=140sHBRImwLRWJxg00LelVyJLYuFGBN6z) using [python code](https://drive.google.com/open?id=1gPLJZwXWT-OYZC07amwd1qmshPa9w9De))

<br>
$$\text{ 7 digit examples } (d=3)$$

**Update:** Based on computed examples and observations so far, multiple patterns and exceptions seem to exist for this case. Three patterns seem to exist:


----------


Pick ($n=2k+79, k\in\mathbb N\cup \{-3,-2,-1\}$), there are infinitely many examples of form:

$$\frac{1}{2}(n^7+14n^6+88n^5 + 320n^4 + 718n^3 + 980n^2 + 748n + 247)$$


----------


Pick ($n=6k+67, k\in\mathbb N\cup \{-2,-1,0\}$), there are infinitely many examples of form:

$$\frac{1}{6}(n^7+14n^6+88n^5 + 320n^4 + 718n^3 + 980n^2 + 748n + 245)$$


----------


Pick ($n=12k+24, k\in\mathbb N$), there are infinitely many examples of form:

$$\frac{1}{12}(2 n^7 + 30 n^6 + 209 n^5 + 852 n^4 + 2117 n^3 + 3114 n^2 + 2474 n + 816)$$


----------


All examples generated by the above are palindromic in number bases $n+1, n+2, n+3$.

Beside patterns, we have exceptions, (examples that do not fit into any patterns) :

    9 3360633
    13 19987816
    15 43443858 
    22 532083314 
    26 1778140759 
    28 2721194733 
    28 11325719295 
    36 47622367425 
    40 97638433343 
    42 224678540182 
    43 265282702996 
    48 561091062285 
   
These are palindromic in column given base $b$ and bases $b+1,b+2$.

> $(3)$ How to show (prove) that all 7 digit examples other than these
> $12$ exceptions are in one of these three patterns (that these are the
> only patterns)?  <br> 
> 
> (No new exceptions or patterns exist for [$b\le111$](), so far.
> [Verified
> here](https://drive.google.com/open?id=1gqUXWMdOUcvDA8ayNoGmtdkJymPyjeoO)
> using [python
> code](https://drive.google.com/open?id=1gPLJZwXWT-OYZC07amwd1qmshPa9w9De))


<br>
$$\text{ 9 digit examples } (d=4)$$

No examples have been found so far. I've checked number bases $b\le50$ so far, [here](https://drive.google.com/open?id=1uiCmF6afB3Jeq-72iYCcch1174xrovUd).

<br>
$$\text{ 11 or more digit examples } (d\ge5)$$

Haven't searched for examples yet, as $d=4$ is already taking a long time per number base. 

<br>
<br>

----------

Some of these examples and patterns are also mentioned in an [OEIS sequence](http://oeis.org/A279093).

 
> How can one find these polynomial pattern expressions for some $d$ algebraically? Rather than needing to compute a lot of examples and then fitting them in a polynomial of degree $2d+1$? 
> 
> Is there anything out there that can actually be used on this problem?

*You can run the python code [here](https://repl.it/@Ves6/3ConsecutivePalindromes) and modify `digit = 1` variable to check `2*digit+1` digit examples; and also modify variables under `#overwrite:` if you wish.*

*P.S. Can the python code I'm using be more optimized? (Is there a faster way to compute this?)*

----------


----------



<br>

$$\text{Looking at almost four consecutive palindromes}$$

*"Almost palindromic in four bases"* - if it is palindromic in bases $b, b+3$ and in $b+1$ or $b+2$. <br> I checked how many of these are in the following digit groups **up to some number base:**


($b\le900$) For $3$ digits, there are $\gt1484$ [examples](https://drive.google.com/open?id=1rA3sYCgo_Slm562Lk7jBSWE9bIuoW0Tv).

($b\le150$) For $5$ digits, only two examples at $b=16$ and at $b=17$

($b\le50$) For $7$ digits, there are no examples.

($b\le30$) For $9$ digits, there are no examples.

Haven't checked $\ge11$ digit examples, yet.

*(More digits get harder to compute/check)*

 **Edit:** Removed odd cases from above as $(*)$ was rewritten a bit (below).

The example output is [here](https://drive.google.com/open?id=1WBeXp7ps0CVnY2BbAJhbmkdkIrrazMQF) (including even digit cases), and the example code can be run [here](https://repl.it/@Ves6/almost4ConsecutivePalindromes); where you can modify the bases (and digits) being checked.

Two observed exceptions so far, are $71240$ for $b=16$ and $1241507$ for $b=17$, both having $5$ digits. The second exception being a twin prime.

Then we can form the $(*)$ observation as:

> All numbers that are not divisible by $b,b+1,b+2,b+3$ and are
> palindromic in $b,b+3$ and either $b+1,b+2$ number bases, must
> have $3$ digits in those bases or are in the finite set $E$ where $E$
> so far is $E=\{71240, 1241507\}$.

But proving this seems equally hard, if not harder, than proving the initial question itself.

From this: If only 3 digit examples have a chance to be palindromic in $4$ consecutive bases, and $E$ has no more new exceptions (as observed here so far), then it is only needed to prove no new 3 digit solutions exist other than ones under $(1)$ above.

----------