cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A163140 Integers n such that in base 2, 3 `1`'s for each `0`.

Original entry on oeis.org

11, 13, 14, 159, 175, 183, 187, 189, 190, 207, 215, 219, 221, 222, 231, 235, 237, 238, 243, 245, 246, 249, 250, 252, 2303, 2431, 2495, 2527, 2543, 2551, 2555, 2557, 2558, 2687, 2751, 2783, 2799, 2807, 2811, 2813, 2814, 2879, 2911, 2927, 2935, 2939, 2941
Offset: 1

Views

Author

Keywords

Comments

There are (4n-1 choose n) 4n-bit members of this sequence for each n=1,2,.... - Charles R Greathouse IV, Oct 12 2009

Examples

			IntegerDigits[11,2]={1,0,1,1},..IntegerDigits[190,2]={1,0,1,1,1,1,1,0},..
		

Crossrefs

Programs

  • Maple
    sort([seq(op(map(proc(t) local j; 2^(4*n)-1-add(2^(j-1),j=t) end proc, combinat:-choose(4*n-1,n))),n=1..3)]);
  • 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,7!}];lst
    Select[Range[3000],DigitCount[#,2,1]==3*DigitCount[#,2,0]&] (* Harvey P. Dale, May 31 2015 *)

A163142 Integers n such that exactly 80 percent of the digits in base 2 are 1's.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

The ratio of 1's over 0's is 4:1. Subset of A143909.

Examples

			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.
		

Crossrefs

Programs

  • 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 *)

Formula

{n: A000120(n)=4*A023416(n) }.

Extensions

Edited by R. J. Mathar, Jul 25 2009
Showing 1-2 of 2 results.