Octal palindromes with even number digits are all composite numbers?

129 Views Asked by At

I want to know whether octal palindromes with even number digits (11 or 1221, but not 121) are all composite numbers, and a general proof if so or a counterexample if not.

1

There are 1 best solutions below

2
On BEST ANSWER

let us consider any number in base 8, $a_n 8^n +,\dots, + a_0$ observe that if $n$ is even then $ a^n \equiv 1 \;\text{mod} 9$ and if $n$ is odd then $ a^n \equiv -1\; \text{mod} 9$ then write the number mod 9, it became $-a_n + a_{n-1}+ \dots + a_0$ if $n$ is even ( or with different sign for $n$ odd). In any case we get argue as in the case of base 10 to show that any octal palindrome number with enev number of digit is multiple of $9$. In general if you consider a number in base $b$ palindrome and with a even number of digits it will be a multiple of $b+1$