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!)
A115517 The mode of the bits of n (using 1 if bimodal). 1
0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
If n is a term of A044951, A115516(n) = a(n); otherwise, A115516(n) = 0 and a(n) = 1 (and n is a term of A031443).
LINKS
FORMULA
a(A031443(k))=1 for k>=1.
EXAMPLE
a(5)=1 because 5 = 101 (binary) and 0 occurs once, but 1 occurs twice, so 1 is the mode. 5 is a member of A044951 (Numbers with no two equally numerous base 2 digits).
a(10)=1 because 10 = 1010 (binary), where 0 and 1 each occur twice. As these bits are bimodal, 1 is chosen. 10 is a member of A031443 (Digitally balanced numbers: numbers which in base 2 have the same number of 0's as 1's.).
MATHEMATICA
Table[If[DigitCount[n, 2, 0]>DigitCount[n, 2, 1], 0, 1], {n, 0, 120}] (* Harvey P. Dale, Jul 29 2019 *)
PROG
(PARI) {for(n=0, 104, b=binary(n); l=length(b); s=sum(m=1, l, b[m]); if(s>=l-s, a=1, a=0); print1(a, ", "))}
CROSSREFS
Cf. A115516 (same but use 0 if bimodal), A031443 (n's bits bimodal), A044951 (n's bits unimodal), A115353 (mode of n's decimal digits).
Sequence in context: A075553 A131729 A144609 * A351039 A022930 A285596
KEYWORD
base,nonn
AUTHOR
Rick L. Shepherd, Jan 23 2006
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 13:50 EDT 2024. Contains 372019 sequences. (Running on oeis4.)