OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..1024
EXAMPLE
6 in binary is 110. Those integers which contain 110 in their binary representations are 6 (110 in binary), 12 (1100 in binary), 13 (1101 in binary), 14 (1110 in binary), 22 (10110 in binary), 24 (11000 in binary), 25 (11001 in binary), 26 (11010 in binary), 27 (11011 in binary), etc... Now, 27 (11011 in binary) is the smallest of these integers that is a binary palindrome; so a(6) = 27.
MATHEMATICA
Table[With[{d = IntegerDigits[n, 2]}, k = 1; While[Nand[SequenceCount[Set[m, IntegerDigits[k, 2]], d] > 0, PalindromeQ@ m], k += 2]; k], {n, 63}] (* Michael De Vlieger, Oct 30 2017 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Oct 19 2008
EXTENSIONS
Extended by Ray Chandler, Oct 26 2008
STATUS
approved