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 A278159 #22 Feb 04 2022 11:19:10 %S A278159 1,2,2,6,2,4,6,30,2,4,4,12,6,12,30,210,2,4,4,12,4,8,12,60,6,12,12,36, %T A278159 30,60,210,2310,2,4,4,12,4,8,12,60,4,8,8,24,12,24,60,420,6,12,12,36, %U A278159 12,24,36,180,30,60,60,180,210,420,2310,30030,2,4,4,12,4,8,12,60,4,8,8,24,12,24,60,420,4,8,8,24,8,16,24,120,12,24,24,72,60,120,420 %N A278159 Run length transform of primorials, A002110. %C A278159 Like every run length transform this sequence satisfies for all i, j: A278222(i) = A278222(j) => a(i) = a(j). %H A278159 Antti Karttunen, <a href="/A278159/b278159.txt">Table of n, a(n) for n = 0..8192</a> %H A278159 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A278159 <a href="/index/Ru#rlt">Index entries for sequences computed with run length transform</a> %F A278159 a(n) = A124859(A005940(1+n)). %e A278159 For n=7, "111" in binary, there is a run of 1-bits of length 3, thus a(7) = product of A002110(3), = A002110(3) = 30. %e A278159 For n=39, "10111" in binary, there are two runs, of lengths 1 and 3, thus a(39) = A002110(1) * A002110(3) = 2*30 = 60. %t A278159 f[n_] := Product[Prime[k], {k, 1, n}]; Table[Times @@ (f[Length[#]]&) /@ Select[Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 94}] (* _Jean-François Alcover_, Jul 11 2017 *) %o A278159 (Scheme) %o A278159 (define (A278159 n) (fold-left (lambda (a r) (* a (A002110 r))) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2))))) %o A278159 ;; See A227349 for the required other functions. %o A278159 (Python) %o A278159 from math import prod %o A278159 from re import split %o A278159 from sympy import primorial %o A278159 def RLT(n,f): %o A278159 """ run length transform of a function f """ %o A278159 return prod(f(len(d)) for d in split('0+', bin(n)[2:]) if d != '') if n > 0 else 1 %o A278159 def A278159(n): return RLT(n,primorial) # _Chai Wah Wu_, Feb 04 2022 %Y A278159 Cf. A002110, A005940, A124859, A227349, A246660, A278161, A278222. %K A278159 nonn,base %O A278159 0,2 %A A278159 _Antti Karttunen_, Nov 16 2016