Problem

Source: European Mathematical Cup

Tags: combinatorics unsolved, combinatorics



We call a sequence of $n$ digits one or zero a code. Subsequence of a code is a palindrome if it is the same after we reverse the order of its digits. A palindrome is called nice if its digits occur consecutively in the code. (Code $(1101)$ contains $10$ palindromes, of which $6$ are nice.) a) What is the least number of palindromes in a code? b) What is the least number of nice palindromes in a code?