login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256754 a(n) = bitwise AND of n and the reverse of n. 3

%I #17 Mar 19 2019 17:19:25

%S 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,

%T 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,

%U 55,0,9,16,27,4,16,26,36,0,0,66,64,68,64,6,1,8,1,10

%N a(n) = bitwise AND of n and the reverse of n.

%H Alois P. Heinz, <a href="/A256754/b256754.txt">Table of n, a(n) for n = 0..10000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Bitwise operation">Bitwise operation</a>

%F a(n) = A004198(n,A004086(n)).

%p a:= n-> Bits[And](n, (s-> parse(cat(s[-i]$i=1..length(s))))(""||n)):

%p seq(a(n), n=0..80);

%t Table[BitAnd[n,FromDigits[Reverse[IntegerDigits[n]]]],{n,0,74}] (* _Ivan N. Ianakiev_, Apr 10 2015 *)

%o (PARI) a(n) = bitand(n, subst(Polrev(digits(n)), x, 10)); \\ _Michel Marcus_, Apr 10 2015

%Y Cf. A004086, A004198, A055483, A056964, A056965, A061205, A068634, A256755, A256756.

%K nonn,base,look,easy

%O 0,3

%A _Alois P. Heinz_, Apr 09 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 06:16 EDT 2024. Contains 371782 sequences. (Running on oeis4.)