Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A159780
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A159780 Inner product of the binary representation of n and its reverse. +0
1
0, 1, 0, 2, 0, 2, 1, 3, 0, 2, 0, 2, 0, 2, 2, 4, 0, 2, 0, 2, 1, 3, 1, 3, 0, 2, 2, 4, 1, 3, 3, 5, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 2, 4, 2, 4, 0, 2, 2, 4, 0, 2, 2, 4, 0, 2, 2, 4, 2, 4, 4, 6, 0, 2, 0, 2, 0, 2, 0, 2, 1, 3, 1, 3, 1, 3, 1, 3, 0, 2, 0, 2, 2, 4, 2, 4, 1, 3, 1, 3, 3, 5, 3, 5, 0, 2, 2, 4, 0, 2, 2, 4, 1 (list; graph; listen)
OFFSET

0,4

COMMENT

a(n) counts the number of 1's that coincide in the binary representation of n and its reverse. For the n in A140900, we have a(n)=0. The number k first appears at n=2^k-1.

EXAMPLE

14 is represented by the binary vector (1,1,1,0). The reverse is (0,1,1,1). The inner product is 1*0+1*1+1*1+0*1 = 2. Hence a(14) = 2.

MATHEMATICA

Table[d=IntegerDigits[n, 2]; d.Reverse[d], {n, 0, 1023}]

CROSSREFS

Sequence in context: A125942 A061986 A127185 this_sequence A055136 A074397 A082023

Adjacent sequences: A159777 A159778 A159779 this_sequence A159781 A159782 A159783

KEYWORD

nonn

AUTHOR

T. D. Noe (noe(AT)sspectra.com), Apr 22 2009

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 December 5 23:38 EST 2009. Contains 170428 sequences.


AT&T Labs Research