The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A171823 a(n) = base-2 concatenation XYZ, where X = number of bits in binary expansion of n, Y = number of 0's, Z = number of 1's. 2
101, 1011, 10010, 11101, 11110, 11110, 11011, 100111, 1001010, 1001010, 100111, 1001010, 100111, 100111, 1000100, 1011001, 1011110, 1011110, 1011011, 1011110, 1011011, 1011011, 1011100, 1011110, 1011011, 1011011, 1011100, 1011011, 1011100, 1011100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
14 = 1110 in base 2, so X = 4 = 100, Y = 1, Z = 3 = 11, a(14) = 100.1.11 = 100111.
MAPLE
F:=proc(n) local t1, t2, t2b, n1, n1b, n0, n0b, t3, t4;
t1:=convert(n, base, 2);
t2:=nops(t1);
t2b:=convert(t2, base, 2);
n1:=add(t1[i], i=1..t2);
n1b:=convert(n1, base, 2);
n0:=t2-n1;
n0b:=convert(n0, base, 2);
t3:=[
seq(t2b[nops(t2b)+1-i], i=1..nops(t2b)),
seq(n0b[nops(n0b)+1-i], i=1..nops(n0b)),
seq(n1b[nops(n1b)+1-i], i=1..nops(n1b))
];
t4:="";
for i from 1 to nops(t3) do t4:=cat(t4, t3[i]); od:
parse(t4);
end;
MATHEMATICA
a[n_] := IntegerDigits[{z, y} = DigitCount[n, 2]; {y+z, y, z}, 2] // Flatten // FromDigits; Array[a, 30] (* Jean-François Alcover, Oct 20 2016 *)
CROSSREFS
Sequence in context: A289578 A190619 A290197 * A289528 A289771 A131194
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Oct 16 2010
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 May 21 02:29 EDT 2024. Contains 372720 sequences. (Running on oeis4.)