A256754 a(n) = bitwise AND of n and the reverse of n.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 4, 13, 8, 3, 16, 1, 16, 19, 0, 4, 22, 0, 8, 16, 26, 8, 16, 28, 2, 13, 0, 33, 34, 33, 36, 1, 2, 5, 0, 8, 8, 34, 44, 36, 0, 10, 16, 16, 0, 3, 16, 33, 36, 55, 0, 9, 16, 27, 4, 16, 26, 36, 0, 0, 66, 64, 68, 64, 6, 1, 8, 1, 10
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
- Wikipedia, Bitwise operation
Programs
-
Maple
a:= n-> Bits[And](n, (s-> parse(cat(s[-i]$i=1..length(s))))(""||n)): seq(a(n), n=0..80);
-
Mathematica
Table[BitAnd[n,FromDigits[Reverse[IntegerDigits[n]]]],{n,0,74}] (* Ivan N. Ianakiev, Apr 10 2015 *)
-
PARI
a(n) = bitand(n, subst(Polrev(digits(n)), x, 10)); \\ Michel Marcus, Apr 10 2015