Combinatorics
AlternativeBase
USAMO
2015
A binary palindrome is a positive integer whose standard base 2 (binary) representation is a palindrome (reads the same backward or forward). (Leading zeros are not permitted in the standard representation.) For example, 2015 is a binary palindrome, because in base 2 it is 11111011111. How many positive integers less than 2015 are binary palindromes?