How to prove $B-1$ and $B+1$ are always palindromes in base $B$?

71 Views Asked by At

While driving to work I thought about a rule, problem is I don't know how to prove it.

The rule is:

For any base $B$ there will always be two palindrome numbers $A$ and $C$, whose values are: $A=(B+1), C=(B-1)$

$A$ is always $11$ - a palindrome, and $C$ will always have one digit - a palindrome.


Examples:

Base Ten: $B=10, A=B+1=11, C=B-1=9$; they both are palindrome.

Binary: $B=2,A=11,C=1$.


My Question: How can I formally prove that? am I wrong?

1

There are 1 best solutions below

1
On BEST ANSWER

The most probably cause of your confusion is the simplicity of the proof. Indeed, there is not much more to show than:

In base $B$, the number $B-1$ is written as a single digit: $(B-1)_B$. The number $B+1$ is written as $11_B$. Therefore, $B-1$ and $B+1$ are palindromes in base $B$ for all choices of $B$.

And indeed, that is just a more dressed up way of what you wrote in your question :).