# Can a number be a palindrome in 4 consecutive number bases?

Edit $$(2020)$$: Update is included at the end of the post.

## $$4$$ consecutive bases?

Are there numbers that are a palindrome in $$4$$ consecutive number bases?

I'm not counting a one digit palindrome as a palindrome. (Discarding trivial solutions.)

After testing some of my plots of palindromic numbers & number systems, I noticed that I couldn't find any numbers which are a palindrome in more than $$3$$ consecutive bases. I was curious to find out why is this the case.

I ran a simple code to check numbers up to $$10^{7}$$ (and all relevant bases), and didn't find any numbers that are a palindrome in $$4$$ or more consecutive bases. For reference, here are the smallest numbers which are palindromic in $$1,2,3$$ consecutive bases:

$$3 = 11_2$$ $$10 = 101_3=22_4$$ $$178 = 454_6 =343_7 = 262_8$$

For example, $$3=1\cdot 2^1 + 1\cdot 2^0=11_2$$ is a binary palindrome.

I strongly suspect that a solution for four consecutive bases does not exits, but I do not know how to prove this observation. For comparison, there are infinitely many numbers that are palindromic in $$3$$ consecutive number bases.

## Almost $$4$$ consecutive bases

Lets examine numbers which are "almost palindromic in four consecutive bases". That is, the numbers palindromic in bases $$b$$ and $$b+3$$, and in either $$b+1$$ or $$b+2$$ number base.

Checking separately some $$d$$ digit palindromes up to some number base $$b$$, I found:

($$b\le6000$$) For $$2$$ digits, there are no examples.

($$b\le900$$) For $$3$$ digits, there are $$1484$$ examples.

($$b\le800$$) For $$4$$ digits, there is only one example at $$b=10$$.

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

($$b\le100$$) For $$6$$ digits, there are no examples.

And etc.

Notice that other than the three exceptions, all other palindromes (examples) of this type have exactly $$3$$ digits in their palindromic bases.

If we can prove this observation, then our solution should have exactly $$3$$ digits in its palindromic bases. This in fact would solve the problem, because $$3$$ digit numbers cannot be palindromic in more than $$3$$ consecutive number bases.

That is,

Two smallest three digit numbers that are a palindrome in three consecutive are: $$178 = 454_6 =343_7 = 262_8$$ $$300 = 606_7 = 454_8 = 363_9$$

All other three digit palindromes which are palindromic in three consecutive number bases are given by (Also mentioned in the OEIS sequence) the following expression using $$n\ge7$$ and is odd:

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

Each term given by this is palindromic in bases $$n+1, n+2, n+3$$ and is $$3$$ digits long.

$$373$$ is the first number given by this equation, and is palindromic in bases $$8,9,10$$.

This three digit pattern will never extend to a fourth consecutive base as TMM said in the comments; which Ross Millikan posted later in his partial answer.

It remains to prove the observation that "almost 4 consecutive base palindromes" can't have more than $$3$$ digits if they are sufficiently large.

This was also cross-posted on Math Overflow, with patterns for $$5$$ and $$7$$ digits also presented there; but nothing new came up so far.

Update

Thanks to Max Alekseyev's method, we know that if a palindrome in $$4$$ consecutive number bases exists, then either:

• It has an equal number of digits in all corresponding number bases and also has $$15$$ or more digits in those number bases (see this answer and corresponding OEIS sequence A323742).

• It does not have an equal number of digits in corresponding bases and is larger than $$10^{12}$$ (i.e. is a term of the OEIS sequence A327810.)

Can we rule out at least one of these two cases?

• Presumably, you mean a nontrivial palindrome, i.e. with more than $1$ digit. Otherwise, any positive integer $x$ is a palindrome in all bases $> x$. – Robert Israel Apr 14 '17 at 22:21
• If you have examples of numbers which are palindromes in 3 bases it would be nice to share them. The patterns may suggest a proof. Are there some with the same number of digits in two successive bases? – Ross Millikan Apr 15 '17 at 0:41
• @RossMillikan I added first $12$, all others seem to follow the exact same pattern. – Vepir Apr 15 '17 at 10:02
• And with the start bases $2\le b\le 100$ and $b+1\le n\le 10^6$, I did not find a solution either. – Peter Apr 15 '17 at 15:30
• Note that $300_{10}$ does not follow the pattern for the middle digits. All the rest have the middle digit start one greater than the outer digits, increase by $1$ then decrease by $2$, following a pattern that is in the OEIS entry. There is another pattern that only comes in rather higher and some numbers, like $300_{10}$ that seem sporadic. – Ross Millikan Apr 16 '17 at 4:15

To prove the three digit pattern, I find it easiest to write it in terms of $b$, the lowest base, which has to be even and at least $6$. Then we have $$(\frac b2+1)b^2+(\frac b2+2)b+(\frac b2+1)\\= (\frac b2)(b+1)^2+(\frac b2+1)(b+1)+(\frac b2)\\= (\frac b2-1)(b+2)^2+(\frac b2+3)(b+2)+(\frac b2-1)\\= \frac{b^3}2+\frac {3b^2}2+\frac {5b}2+1$$ where the first three lines make the palindrome explicit in the three bases. I think finding this pattern is rather easy. If one did a computer search up to $1000$ one would find the first four numbers and the pattern is clear. The algebra to verify it is also not hard. We can prove that this pattern will never extend to a fourth base. If we try base $b-1$ we can divide the number by $(b-1)^2+1$ to find the first and third digit. We find it is $\frac b2+2$ as one might expect. The middle digit wants to be $\frac b2+6$ but the total is too high by $3$. Similarly if we try base $b+3$ we find the first and last digits are $\frac b2-2$, the closest middle digit is $\frac b2+8$, but we are $3$ too high again. These patterns are only established by $b=16$ for base $b-1$ and $b=12$ for $b+3$ but we can easily check the smaller numbers. This does not prove that there are no other examples for four successive bases. I think a similar analysis could be done for the five digit pattern but I haven't done it.
• @Vepir Analysis on the $5$-digit pattern yields that if $n=4x$, the number given is $(3x-5)(2x+33)(x-67)(2x+78)(3x-35)$ in base $4x+4$ (each of those are digits). So again, it just suffices to try small cases. Maybe it's possible to prove that for all of these polynomials the coefficients of $x$ in the next necessary base form a palindrome, and the constants don't? But then there's still the irregular ones. So I don't know. – Carl Schildkraut Apr 20 '17 at 22:34
• @Vepir: I suspect the longer patterns were searched for and not found. It is an obvious extension. If it had been found it would be known. There are lots of amateur mathematicians who would try it. I suspect the seven digit ones are based on $\frac b6$ because $(\frac b6)^6 - (\frac b6-1)^6 \approx (\frac b6)^5$ and you can increase the next digit to come close. That is why the three digit ones are based on $\frac b2$ – Ross Millikan Apr 20 '17 at 23:05
• @CarlSchildkraut: That pattern is not a palindrome I find $(3x+4)(2x+9)(x+11)(2x+9)(3x+4)$ for base $4x+1, (3x+1)(2x+2)(x)(2x+2)(3x+1)$ for base $4x+2$ and $(3x-2)(2x+10)(x-11)(2x+10)(3x-2)$ in base $4x+3$ I am sure the same sort of analysis as I did for the three digit cases will show this works and the neighboring ones don't – Ross Millikan Apr 20 '17 at 23:21
• @RossMillikan I know - I'm saying it equals $(3x−5)(2x+33)(x−67)(2x+78)(3x−35)$ when written in base $4x+4$, so it suffices to only check small cases. I haven't tried it at $4x$ yet, but I imagine it should be similar. – Carl Schildkraut Apr 21 '17 at 2:19