|
|
A176893
|
|
a(n) = 2^(number of zeros in binary expansion of n) * 3^(numbers of ones in binary expansion of n).
|
|
1
|
|
|
2, 3, 6, 9, 12, 18, 18, 27, 24, 36, 36, 54, 36, 54, 54, 81, 48, 72, 72, 108, 72, 108, 108, 162, 72, 108, 108, 162, 108, 162, 162, 243, 96, 144, 144, 216, 144, 216, 216, 324, 144, 216, 216, 324, 216, 324, 324, 486, 144, 216, 216
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
This method doesn't give a distinct encoding of the nonnegative numbers as 54 appears three times and 144 and 216 many more times.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
A000120 := proc(n) add(d, d=convert(n, base, 2)) ; end proc:
A023416 := proc(n) if n= 0 then 1; else add(1-d, d=convert(n, base, 2)) ; end if; end proc:
|
|
MATHEMATICA
|
Table[2^Count[Table[((IntegerDigits[n, 2]) /. 0 -> 2) /. 1 -> 3, {n, 0, 50}][[n]], 2]*3^Count[Table[(( IntegerDigits[n, 2]) /. 0 -> 2) /. 1 -> 3, {n, 0, 50}][[n]], 3], {n, 1, 51}]
Table[2^DigitCount[n, 2, 0] 3^DigitCount[n, 2, 1], {n, 0, 50}] (* Harvey P. Dale, Oct 29 2012 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|