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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A290260 a(n) = number of isolated 0's in the binary representation of n. 2

%I #15 Aug 27 2018 23:53:09

%S 0,1,0,0,1,1,0,0,0,2,1,0,1,1,0,0,0,1,0,1,2,2,1,0,0,2,1,0,1,1,0,0,0,1,

%T 0,0,1,1,0,1,1,3,2,1,2,2,1,0,0,1,0,1,2,2,1,0,0,2,1,0,1,1,0,0,0,1,0,0,

%U 1,1,0,0,0,2,1,0,1,1,0,1,1,2,1,2,3,3,2,1,1,3,2,1,2,2,1,0,0,1,0,0,1,1,0,1,1,3,2,1,2,2,1,0,0

%N a(n) = number of isolated 0's in the binary representation of n.

%C a(2n) = number of singletons in the integer partition having viabin number n. The viabin number of an integer partition is defined in the following way. Consider the southeast border of the Ferrers board of the integer partition and consider the binary number obtained by replacing each east step with 1 and each north step, except the last one, with 0. The corresponding decimal form is, by definition, the viabin number of the given integer partition. "Viabin" is coined from "via binary". For example, consider the integer partition [5,4,4,3,1]. The southeast border of its Ferrers board yields 101101001, leading to the viabin number 361.

%C The following 5 formulae are used for the Maple program.

%H Alois P. Heinz, <a href="/A290260/b290260.txt">Table of n, a(n) for n = 1..65536</a>

%F a(1) = 0.

%F If n is odd, then a(2n) = 1 + a(n).

%F a(2n+1) = a(n).

%F If n-2 mod 4 = 0, then a(2n) = a(n) - 1.

%F If n mod 8 = 0 then a(2n) = a(n).

%e a(722) = 3; indeed, the binary representation of 722 is 1011010010, having 3 isolated 0's.

%p a := proc (n) if n = 1 then 0 elif `mod`(n, 2) = 0 and `mod`((1/2)*n, 2) = 1 then 1+a((1/2)*n) elif `mod`(n, 2) = 1 then a((1/2)*n-1/2) elif `mod`(n-4, 8) = 0 then a((1/2)*n)-1 else a((1/2)*n) end if end proc: seq(a(n), n = 1 .. 200);

%p # second Maple program:

%p b:= n-> `if`(n<6, 0, b(iquo(n, 2)))+`if`(n mod 8=5, 1, 0):

%p a:= n-> b(2*n+1):

%p seq(a(n), n=1..200); # _Alois P. Heinz_, Sep 14 2017

%t Table[Count[Split@ IntegerDigits[n, 2], {0}], {n, 105}] (* _Michael De Vlieger_, Sep 16 2017 *)

%Y Cf. A292342.

%K nonn

%O 1,10

%A _Emeric Deutsch_, Sep 14 2017

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:54 EDT 2024. Contains 371960 sequences. (Running on oeis4.)