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!)
A176893 a(n) = 2^(number of zeros in binary expansion of n) * 3^(numbers of ones in binary expansion of n). 1

%I #13 May 12 2019 02:23:34

%S 2,3,6,9,12,18,18,27,24,36,36,54,36,54,54,81,48,72,72,108,72,108,108,

%T 162,72,108,108,162,108,162,162,243,96,144,144,216,144,216,216,324,

%U 144,216,216,324,216,324,324,486,144,216,216

%N a(n) = 2^(number of zeros in binary expansion of n) * 3^(numbers of ones in binary expansion of n).

%C This method doesn't give a distinct encoding of the nonnegative numbers as 54 appears three times and 144 and 216 many more times.

%F a(n) = 2^A023416(n)*3^A000120(n). [_R. J. Mathar_, Dec 09 2010]

%p A000120 := proc(n) add(d, d=convert(n,base,2)) ;end proc:

%p A023416 := proc(n) if n= 0 then 1; else add(1-d, d=convert(n,base,2)) ; end if; end proc:

%p A176893 := proc(n) 2^A023416(n)*3^A000120(n); end proc: # _R. J. Mathar_, Dec 09 2010

%t 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}]

%t Table[2^DigitCount[n,2,0] 3^DigitCount[n,2,1],{n,0,50}] (* _Harvey P. Dale_, Oct 29 2012 *)

%Y Cf. A000120, A023416.

%K nonn,easy,base

%O 0,1

%A _Roger L. Bagula_, Apr 28 2010

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 April 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)