Counting Palindromes
Using a 26-letter alphabet, how many 3-letter palindromes are there? How many 5-letter palindromes?
(A palindrome reads the same forwards and backwards, e.g. 'aba' or 'level'.)
Hints
- A palindrome is fully determined by its first half; the second half is just a mirror.
- Count the number of freely-choosable positions: $\lceil n/2 \rceil$ for a length-$n$ string.
- Raise the alphabet size to that power: