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