OFFSET
0,12
LINKS
FORMULA
a(n) = n - A206913(n).
EXAMPLE
The largest binary palindrome that doesn't exceed 30 is 27 (11011 r2). 30 - 27 = 3, so a(30) = 3.
PROG
(PARI) isA006995(n) = Vecrev(n=binary(n))==n;
a(n) = {my(k=0); while(!isA006995(n-k), k++); k; } \\ Altug Alkan, Apr 25 2018
CROSSREFS
KEYWORD
AUTHOR
Allan C. Wechsler, Apr 25 2018
EXTENSIONS
More terms from Altug Alkan, Apr 25 2018
STATUS
approved