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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A159780 Inner product of the binary representation of n and its reverse. 4
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; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

a(n) gives 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.

Also central terms and right edge of the triangle in A173920: a(n)=A173920(2*n,n)=A173920(n,n). [From Reinhard Zumkeller, Mar 04 2010]

a(A000225(n)) = n and a(m) < n for m < A000225(n). [Reinhard Zumkeller, Oct 21 2011]

a(n) = sum(A030308(n,k)*A030308(n,A070939(n)-1-k): k = 0..A070939(n)-1). - Reinhard Zumkeller, Mar 10 2013

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

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}]

PROG

(Haskell)

a159780 n = sum $ zipWith (*) bs $ reverse bs

   where bs = a030308_row n

-- Reinhard Zumkeller, Mar 10 2013, Oct 21 2011

CROSSREFS

Cf. A216176.

Sequence in context: A125942 A061986 A127185 * A138036 A055136 A074397

Adjacent sequences:  A159777 A159778 A159779 * A159781 A159782 A159783

KEYWORD

nonn,base

AUTHOR

T. D. Noe, Apr 22 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified July 27 04:25 EDT 2017. Contains 289841 sequences.