I was reading an article about palindromes the other day, and came across a formel definition of palindromic numbers.
Although palindromic numbers are most often considered in the decimal system, the concept of palindromicity can be applied to the natural numbers in any numeral system.
For the few who does not know it already, here it is – and it gave me an excuse to write a little more 🙂
Consider a number in base
, where it is written in standard notation with
digits
as:
with, as usual, for all
and
. Then
is palindromic if and only if
for all
. Zero is written
in any base and is also palindromic by definition.