Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A144078
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A144078 a(n) = the number of digits in the binary representation of n that each differ from the respective digit in the binary reversal of n. (ie a(n) = number of 1's in n XOR A030101(n).) +0
2
0, 2, 0, 2, 0, 2, 0, 2, 0, 4, 2, 4, 2, 2, 0, 2, 0, 4, 2, 2, 0, 4, 2, 4, 2, 2, 0, 4, 2, 2, 0, 2, 0, 4, 2, 4, 2, 6, 4, 4, 2, 6, 4, 2, 0, 4, 2, 4, 2, 2, 0, 6, 4, 4, 2, 6, 4, 4, 2, 4, 2, 2, 0, 2, 0, 4, 2, 4, 2, 6, 4, 2, 0, 4, 2, 4, 2, 6, 4, 4, 2, 6, 4, 2, 0, 4, 2, 4, 2, 6, 4, 2, 0, 4, 2, 4, 2, 2, 0, 6, 4, 4, 2, 4, 2 (list; graph; listen)
OFFSET

1,2

COMMENT

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

LINKS

Leroy Quet, Home Page (listed in lieu of email address)

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 two bit pairs that differ, so a(20) = 2.

MAPLE

A144078 := 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, ", A144078(n)) ; od: [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 14 2008]

CROSSREFS

A030101, A144079

Sequence in context: A045843 A096158 A053471 this_sequence A008614 A036663 A096577

Adjacent sequences: A144075 A144076 A144077 this_sequence A144079 A144080 A144081

KEYWORD

base,nonn

AUTHOR

Leroy Quet, Sep 09 2008

EXTENSIONS

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 13:47 EST 2009. Contains 167481 sequences.


AT&T Labs Research