login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A144079 a(n) = the number of digits in the binary representation of n that each equal the respective digit in the binary reversal of n. (ie a(n) = number of 0's in n XOR A030101(n).) 2
1, 0, 2, 1, 3, 1, 3, 2, 4, 0, 2, 0, 2, 2, 4, 3, 5, 1, 3, 3, 5, 1, 3, 1, 3, 3, 5, 1, 3, 3, 5, 4, 6, 2, 4, 2, 4, 0, 2, 2, 4, 0, 2, 4, 6, 2, 4, 2, 4, 4, 6, 0, 2, 2, 4, 0, 2, 2, 4, 2, 4, 4, 6, 5, 7, 3, 5, 3, 5, 1, 3, 5, 7, 3, 5, 3, 5, 1, 3, 3, 5, 1, 3, 5, 7, 3, 5, 3, 5, 1, 3, 5, 7, 3, 5, 3, 5, 5, 7, 1, 3, 3, 5, 3, 5 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

COMMENTS

A144078(n) + A144079(n) = A070939(n), the number of binary digits in n.

EXAMPLE

20 in binary is 10100. Compare this with its digit reversal, 00101. XOR each pair of respective digits: 1 XOR 0 = 1, 0 XOR 0 = 0, 1 XOR 1 = 0, 0 XOR 0 = 0, 0 XOR 1 = 1. There are three bit pairs that contain the same values, so a(20) = 3.

MAPLE

A144079 := proc(n) local a, dgs, i; a := 0 ; dgs := convert(n, base, 2) ; for i from 1 to nops(dgs) do if op(i, dgs)+op(-i, dgs) <> 1 then a := a+1 ; fi; od; RETURN(a) ; end: for n from 1 to 240 do printf("%d, ", A144079(n)) ; od: [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 14 2008]

CROSSREFS

A030101, A144078

Sequence in context: A109698 A029231 A025808 * A071575 A038569 A020650

Adjacent sequences:  A144076 A144077 A144078 * A144080 A144081 A144082

KEYWORD

base,nonn

AUTHOR

Leroy Quet Sep 09 2008

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 14 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 16:36 EST 2012. Contains 206058 sequences.