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!)
A139353 Let the binary expansion of n be n = Sum_{k} 2^{r_k}, let e(n) be the number of r_k's that are even, o(n) the number that are odd; sequence gives e(n)*o(n). 10

%I #12 Jul 18 2023 02:30:48

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

%T 0,2,1,2,2,4,0,2,0,3,2,4,3,6,1,2,2,4,2,3,4,6,2,4,3,6,4,6,6,9,0,0,1,2,

%U 0,0,2,3,1,2,2,4,2,3,4,6,0,0,2,3,0,0,3,4,2,3,4,6,3,4,6,8,1,2,2

%N Let the binary expansion of n be n = Sum_{k} 2^{r_k}, let e(n) be the number of r_k's that are even, o(n) the number that are odd; sequence gives e(n)*o(n).

%C e(n) + o(n) = A000120(n), the binary weight of n.

%H Amiram Eldar, <a href="/A139353/b139353.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = A139351(n) * A139352(n). - _Amiram Eldar_, Jul 18 2023

%e If n = 43 = 2^0+2^2+2^3+2^5, e(43)=1, o(43)=3.

%t e[0] = 0; e[n_] := e[n] = e[Floor[n/4]] + If[OddQ[Mod[n, 4]], 1, 0];

%t o[0] = 0; o[n_] := o[n] = o[Floor[n/4]] + If[Mod[n, 4] > 1, 1, 0];

%t a[n_] := e[n] * o[n]; Array[a, 100, 0] (* _Amiram Eldar_, Jul 18 2023 *)

%o See link in A139351 for Fortran program.

%Y Cf. A000120, A139351, A139352, A139354, A139355, A039004, A139370, A139371, A139372, A139373.

%K nonn,base

%O 0,8

%A _Nadia Heninger_ and _N. J. A. Sloane_, Jun 07 2008

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 July 16 09:56 EDT 2024. Contains 374345 sequences. (Running on oeis4.)