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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A227193 Difference of (product of runlengths of 1-bits) and (product of runlengths of 0-bits) in binary representation of n. 3
 0, 0, 0, 1, -1, 0, 1, 2, -2, -1, 0, 1, 0, 1, 2, 3, -3, -2, -1, 0, -1, 0, 1, 2, -1, 0, 1, 3, 1, 2, 3, 4, -4, -3, -2, -1, -3, -1, 0, 1, -2, -1, 0, 1, 0, 1, 2, 3, -2, -1, 0, 2, 0, 1, 3, 5, 0, 1, 2, 5, 2, 3, 4, 5, -5, -4, -3, -2, -5, -2, -1, 0, -5, -3, -1, 0, -2, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,8 COMMENTS The sequence seems to consist of palindromic subsequences centered around each (2^k)-1 and 2^k (with end points near the terms of A000975), which is easily explained by symmetric pairing of binary expansion of n and its complement. LINKS Antti Karttunen, Table of n, a(n) for n = 0..10922 FORMULA a(n) = A227349(n) - A227350(n). MAPLE a:= proc(n) local i, j, m, r, s; m, r, s:= n, 1, 1; while m>0 do for i from 0 while irem(m, 2, 'h')=0 do m:=h od; for j from 0 while irem(m, 2, 'h')=1 do m:=h od; r, s:= r*j, s*max(i, 1) od; r-s end: seq(a(n), n=0..100); # Alois P. Heinz, Jul 11 2013 MATHEMATICA a[n_] := With[{s = Split @ IntegerDigits[n, 2]}, Times @@ Length /@ Select[ s, First[#]==1&] - Times @@ Length /@ Select[s , First[#]==0&]]; Table[ a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 28 2016 *) PROG (Scheme) (define (A227193 n) (- (A227349 n) (A227350 n))) CROSSREFS Cf. A145037, A227190. Sequence in context: A179769 A340594 A361685 * A287397 A364204 A111407 Adjacent sequences: A227190 A227191 A227192 * A227194 A227195 A227196 KEYWORD sign AUTHOR Antti Karttunen, Jul 08 2013 STATUS approved

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.

Last modified March 4 22:06 EST 2024. Contains 370532 sequences. (Running on oeis4.)