login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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.
FORMULA
a(n) = 2^A023416(n)*3^A000120(n). [R. J. Mathar, Dec 09 2010]
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:
A176893 := proc(n) 2^A023416(n)*3^A000120(n); end proc: # R. J. Mathar, Dec 09 2010
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
Sequence in context: A008810 A280984 A339485 * A144677 A309677 A058616
KEYWORD
nonn,easy,base
AUTHOR
Roger L. Bagula, Apr 28 2010
STATUS
approved