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!)
A175096 Write n in binary (without leading 0's). a(n) = the number of distinct numerical values made by permutating the runs of 0's and the runs of 1's, such that the runs (of nonzero length) of 1's alternate with the runs (of nonzero length) of 0's. The permutated binary numbers (those not equal to n) may start with leading 0's. 1

%I #7 Mar 11 2014 01:32:50

%S 1,2,1,2,1,2,1,2,1,2,2,2,2,2,1,2,1,4,2,4,1,4,2,2,2,4,1,2,2,2,1,2,1,4,

%T 2,2,2,8,2,4,2,2,3,8,3,4,2,2,2,8,1,8,3,2,2,2,2,4,2,2,2,2,1,2,1,4,2,4,

%U 2,8,2,4,1,6,6,4,6,8,2,4,2,6,6,6,1,6,3,8,6,6,3,8,3,4,2,2,2,8,1,4,6,4,2,8,6

%N Write n in binary (without leading 0's). a(n) = the number of distinct numerical values made by permutating the runs of 0's and the runs of 1's, such that the runs (of nonzero length) of 1's alternate with the runs (of nonzero length) of 0's. The permutated binary numbers (those not equal to n) may start with leading 0's.

%C Each "run" of binary digit b (0 or 1) is bounded by digits equal to 1-b, or is bounded by the edge of the binary string (which is n written in binary).

%C For all odd n, the values of all permutations of binary n are themselves odd, since there are an odd number of runs (the first and last runs being of 1's).

%e 20 in binary is 10100. So we have a run of one 1, followed by a run of one 0, followed by a run of one 1, followed finally by a run of two 0's. The permutations of the runs of 0's and the run's of 1's form these distinct binary numbers: 00101 (5 in decimal), 01001 (9 in decimal), 10010 (18 in decimal), and 10100 (20 in decimal). So a(20) = 4 since there are 4 such permutations.

%K base,nonn

%O 1,2

%A _Leroy Quet_, Feb 01 2010

%E Extended by _Ray Chandler_, Feb 07 2010

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 March 19 02:51 EDT 2024. Contains 370952 sequences. (Running on oeis4.)