OFFSET
1,3
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
20 in binary is 10100. The reversal of the binary digits is 00101. So, from leftmost to rightmost respective digits, we AND 10100 and 00101: 1 AND 0 = 0. 0 AND 0 = 0. 1 AND 1 = 1. 0 AND 0 = 0. And 0 AND 1 = 1. So, 10100 AND 00101 is 100, which is 4 in decimal. So a(20) = 4.
MATHEMATICA
Table[f = IntegerDigits[x, 2]; f = f + Reverse[f]; FromDigits[ Table[If[f[[r]] == 2, 1, 0], {r, 1, Length[f]}], 2], {x, 83}] (* Dylan Hamilton, Oct 15 2010 *)
Table[With[{d = IntegerDigits[n, 2]}, FromDigits[#, 2] &@ Map[BitAnd @@ # &, Transpose@{d, Reverse@ d}]], {n, 83}] (* Michael De Vlieger, Sep 03 2017 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Mar 24 2010
EXTENSIONS
Extended, with redundant initial entries included, by Dylan Hamilton, Oct 15 2010
STATUS
approved