OFFSET
0,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16383
Chai Wah Wu, Sums of products of binomial coefficients mod 2 and run length transforms of sequences, arXiv:1610.06166 [math.CO], 2016.
FORMULA
a(n) = Sum_{k=0..n} ((binomial(n+3k,6k)*binomial(n,k)) mod 2). - Chai Wah Wu, Nov 19 2019
EXAMPLE
MATHEMATICA
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 *)
PROG
(Scheme)
(define (A278161 n) (fold-left (lambda (a r) (* a (A008619 r))) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
(define (A008619 n) (+ 1 (/ (- n (modulo n 2)) 2)))
;; See A227349 for the required other functions.
(Python)
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 14 2016
STATUS
approved