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 A278161 #21 Sep 28 2021 01:21:48 %S A278161 1,1,1,2,1,1,2,2,1,1,1,2,2,2,2,3,1,1,1,2,1,1,2,2,2,2,2,4,2,2,3,3,1,1, %T A278161 1,2,1,1,2,2,1,1,1,2,2,2,2,3,2,2,2,4,2,2,4,4,2,2,2,4,3,3,3,4,1,1,1,2, %U A278161 1,1,2,2,1,1,1,2,2,2,2,3,1,1,1,2,1,1,2,2,2,2,2,4,2,2,3,3,2,2,2,4,2,2,4,4,2,2,2,4,4,4,4,6,2,2,2,4,2,2,4,4,3 %N A278161 Run length transform of A008619 (floor(n/2)+1). %H A278161 Antti Karttunen, <a href="/A278161/b278161.txt">Table of n, a(n) for n = 0..16383</a> %H A278161 Chai Wah Wu, <a href="https://arxiv.org/abs/1610.06166">Sums of products of binomial coefficients mod 2 and run length transforms of sequences</a>, arXiv:1610.06166 [math.CO], 2016. %H A278161 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A278161 a(n) = A046951(A005940(1+n)), a(A156552(n)) = A046951(n). %F A278161 a(n) = Sum_{k=0..n} ((binomial(n+3k,6k)*binomial(n,k)) mod 2). - _Chai Wah Wu_, Nov 19 2019 %e A278161 n=111 is "1101111" in binary, which has two runs of 1-bits: the other has length 2, and the other has length 4, thus we take the product A008619(2)*A008619(4) = (floor(2/2)+1) * (floor(4/2)+1) = 2*3, which is the result, so a(111) = 6. %t A278161 f[n_] := Floor[n/2] + 1; Table[Times @@ (f[Length[#]]&) /@ Select[ Split[ IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 120}] (* _Jean-François Alcover_, Jul 11 2017 *) %o A278161 (Scheme) %o A278161 (define (A278161 n) (fold-left (lambda (a r) (* a (A008619 r))) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2))))) %o A278161 (define (A008619 n) (+ 1 (/ (- n (modulo n 2)) 2))) %o A278161 ;; See A227349 for the required other functions. %o A278161 (Python) %o A278161 def A278161(n): return sum(int(not (~(n+3*k) & 6*k) | (~n & k)) for k in range(n+1)) # _Chai Wah Wu_, Sep 28 2021 %Y A278161 Cf. A005940, A008619, A046951, A156552. %Y A278161 Cf. A106737, A227349 for other run length transforms, and also A278222. %K A278161 nonn,base %O A278161 0,4 %A A278161 _Antti Karttunen_, Nov 14 2016