cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A139353 #14 Dec 19 2024 11:41:30
%S A139353 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 A139353 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 A139353 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 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).
%C A139353 e(n) + o(n) = A000120(n), the binary weight of n.
%H A139353 Amiram Eldar, <a href="/A139353/b139353.txt">Table of n, a(n) for n = 0..10000</a>
%F A139353 a(n) = A139351(n) * A139352(n). - _Amiram Eldar_, Jul 18 2023
%e A139353 If n = 43 = 2^0+2^2+2^3+2^5, e(43)=1, o(43)=3.
%t A139353 e[0] = 0; e[n_] := e[n] = e[Floor[n/4]] + If[OddQ[Mod[n, 4]], 1, 0];
%t A139353 o[0] = 0; o[n_] := o[n] = o[Floor[n/4]] + If[Mod[n, 4] > 1, 1, 0];
%t A139353 a[n_] := e[n] * o[n]; Array[a, 100, 0] (* _Amiram Eldar_, Jul 18 2023 *)
%o A139353 (Fortran) c See link in A139351
%Y A139353 Cf. A000120, A139351, A139352, A139354, A139355, A039004, A139370, A139371, A139372, A139373.
%K A139353 nonn,base
%O A139353 0,8
%A A139353 _Nadia Heninger_ and _N. J. A. Sloane_, Jun 07 2008