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!)
A163142 Integers n such that exactly 80 percent of the digits in base 2 are 1's. 2
23, 27, 29, 30, 639, 703, 735, 751, 759, 763, 765, 766, 831, 863, 879, 887, 891, 893, 894, 927, 943, 951, 955, 957, 958, 975, 983, 987, 989, 990, 999, 1003, 1005, 1006, 1011, 1013, 1014, 1017, 1018, 1020, 18431, 19455, 19967, 20223, 20351, 20415 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The ratio of 1's over 0's is 4:1. Subset of A143909.
LINKS
FORMULA
{n: A000120(n)=4*A023416(n) }.
EXAMPLE
The 29 is in the sequence because it reads A007088(29)= 11101 in base 2, and 4 of the 5 digits are 1.
The 1003 is in the sequence because it reads A007088(1003)= 1111101011 in base 2, and 8 of the 10 digits are 1.
MATHEMATICA
f0[n_]:=DigitCount[n, 2, 0]; f1[n_]:=DigitCount[n, 2, 1]; f[n_]:=f1[n]/f0[n]; lst={}; Do[If[f[n]==3, AppendTo[lst, n]], {n, 8!}]; lst
ZS={}; Do[dc=DigitCount[n, 2]; If[dc[[1]]==4*dc[[2]], AppendTo[ZS, n]], {n, 10, 10^6}]; ZS (* Zak Seidov, Jul 28 2009 *)
d80Q[n_]:=Module[{idn2=DigitCount[n, 2]}, idn2[[1]]==4*idn2[[2]]]; Select[ Range[25000], d80Q] (* Harvey P. Dale, Mar 18 2012 *)
CROSSREFS
Sequence in context: A365020 A316724 A160774 * A038772 A188454 A178960
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited by R. J. Mathar, Jul 25 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 01:57 EDT 2024. Contains 370952 sequences. (Running on oeis4.)