login
Hamming weight of 3n: number of 1's in binary expansion of 3n.
8

%I #45 Sep 01 2024 03:07:03

%S 0,2,2,2,2,4,2,3,2,4,4,2,2,4,3,4,2,4,4,4,4,6,2,3,2,4,4,3,3,5,4,5,2,4,

%T 4,4,4,6,4,5,4,6,6,2,2,4,3,4,2,4,4,4,4,6,3,4,3,5,5,4,4,6,5,6,2,4,4,4,

%U 4,6,4,5,4,6,6,4,4,6,5,6,4,6,6,6,6,8,2,3,2,4,4,3,3,5,4,5,2,4,4

%N Hamming weight of 3n: number of 1's in binary expansion of 3n.

%C a(n) is also the largest integer such that 2^a(n) divides binomial(6n,3n)=A066802(n). - _Benoit Cloitre_, Mar 27 2002

%C a(n) = A000120(A008585(n)). - _Reinhard Zumkeller_, Nov 03 2010

%C a(A002450(n)) = 2*n.

%H T. D. Noe, <a href="/A036555/b036555.txt">Table of n, a(n) for n = 0..1000</a>

%H S. R. Finch, P. Sebah and Z.-Q. Bai, <a href="http://arXiv.org/abs/0802.2654">Odd Entries in Pascal's Trinomial Triangle</a>, arXiv:0802.2654 [math.NT], 2008.

%H Philippe Flajolet, Peter Grabner, Peter Kirschenhofer, Helmut Prodinger and Robert F. Tichy, <a href="http://dx.doi.org/10.1016/0304-3975(92)00065-Y">Mellin transforms and asymptotics: digital sums</a>, Theoret. Comput. Sci. 123 (1994), 291-314.

%H Michael Gilleland, <a href="/selfsimilar.html">Some Self-Similar Integer Sequences</a>

%H D. J. Newman, <a href="http://dx.doi.org/10.1090/S0002-9939-1969-0244149-8">On the number of binary digits in a multiple of three</a>, Proc. Amer. Math. Soc. 21 (1969) 719-721.

%p t1:=[];

%p for n from 0 to 100 do t2:=convert(3*n,base,2); t3:=add(t2[i],i=1..nops(t2)); t1:=[op(t1),t3];od:

%p t1;

%t Total/@IntegerDigits[3Range[0,100],2] (* _Harvey P. Dale_, Oct 03 2011 *)

%o (Haskell)

%o a036555 = a000120 . (* 3) -- _Reinhard Zumkeller_, Sep 01 2013

%o (PARI) a(n) = hammingweight(3*n); \\ _Michel Marcus_, Mar 13 2014

%Y Cf. A036556, A036557, A099033, A190944.

%K nonn,base,easy,nice

%O 0,2

%A _Dan Hoey_

%E Name edited by _Michel Marcus_, Mar 13 2014