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.

A306549 a(n) is the product of the positions of the zeros in the binary expansion of n (the most significant bit having position 1).

This page as a plain text file.
%I A306549 #30 Jun 01 2024 15:05:14
%S A306549 1,1,2,1,6,2,3,1,24,6,8,2,12,3,4,1,120,24,30,6,40,8,10,2,60,12,15,3,
%T A306549 20,4,5,1,720,120,144,24,180,30,36,6,240,40,48,8,60,10,12,2,360,60,72,
%U A306549 12,90,15,18,3,120,20,24,4,30,5,6,1,5040,720,840,120,1008
%N A306549 a(n) is the product of the positions of the zeros in the binary expansion of n (the most significant bit having position 1).
%C A306549 Apparently, the variant where the least significant bit has position 1 corresponds to A124773.
%H A306549 Rémy Sigrist, <a href="/A306549/b306549.txt">Table of n, a(n) for n = 0..16384</a>
%F A306549 a(n) = A070939(n)! / A306286(n).
%F A306549 a(2*n) = a(n) * (1+A070939(n)).
%F A306549 a(2*n+1) = a(n).
%F A306549 a(2^k) = (k+1)! for any k >= 0.
%F A306549 a(2^k-1) = 1 for any k >= 0.
%F A306549 a(2^k-2) = k for any k >= 1.
%e A306549 The first terms, alongside the positions of zeros and the binary representation of n, are:
%e A306549   n   a(n)  Pos.zeros  bin(n)
%e A306549   --  ----  ---------  ------
%e A306549    0     1  {1}             0
%e A306549    1     1  {}              1
%e A306549    2     2  {2}            10
%e A306549    3     1  {}             11
%e A306549    4     6  {2,3}         100
%e A306549    5     2  {2}           101
%e A306549    6     3  {3}           110
%e A306549    7     1  {}            111
%e A306549    8    24  {2,3,4}      1000
%e A306549    9     6  {2,3}        1001
%e A306549   10     8  {2,4}        1010
%e A306549   11     2  {2}          1011
%e A306549   12    12  {3,4}        1100
%e A306549   13     3  {3}          1101
%e A306549   14     4  {4}          1110
%e A306549   15     1  {}           1111
%t A306549 A306549[n_] := Times @@ Flatten[Position[IntegerDigits[n, 2], 0]];
%t A306549 Array[A306549, 100, 0] (* _Paolo Xausa_, Jun 01 2024 *)
%o A306549 (PARI) a(n) = my (b=binary(n)); prod(k=1, #b, if (b[k]==0, k, 1))
%o A306549 (PARI) a(n) = vecprod(Vec(select(x->(x==0), binary(n), 1)));
%o A306549 (Python)
%o A306549 from math import prod
%o A306549 def a(n): return prod(i for i, bi in enumerate(bin(n)[2:], 1) if bi == "0")
%o A306549 print([a(n) for n in range(70)]) # _Michael S. Branicky_, Jun 01 2024
%Y A306549 Cf. A070939, A124773, A306286.
%K A306549 nonn,base,easy
%O A306549 0,3
%A A306549 _Rémy Sigrist_, May 04 2019