login
A285114
Row sums of A285117: a(n) = 2 + Sum_{k=1..(n-1)} C(n-1,k-1) XOR C(n-1,k), a(0) = 1, a(1) = 2.
4
1, 2, 2, 8, 6, 16, 40, 88, 158, 384, 416, 704, 1688, 2896, 8680, 14128, 28942, 65152, 111200, 231504, 438736, 942480, 1772016, 4320464, 7173432, 18279648, 29516976, 66594368, 125302232, 258582272, 502725168, 1009023808, 2156547822, 3961342464, 8844419136, 17224261808, 34931449264, 71168739072, 138318974000, 307489703840
OFFSET
0,2
LINKS
FORMULA
a(0) = 1, a(1) = 2, for n > 1, a(n) = 2 + Sum_{k=1..(n-1)} C(n-1,k-1) XOR C(n-1,k), where C(n,k) is a binomial coefficient and XOR is bitwise-XOR (A003987).
a(n) = A285113(n) - A285115(n).
a(n) = A000079(n) - 2*A285115(n).
MATHEMATICA
a[n_]:=If[n<2, n + 1, 2 + Sum[BitXor[Binomial[n - 1, k - 1], Binomial[n - 1, k]], {k, n - 1}]]; Table[a[n], {n, 0, 100}] (* Indranil Ghosh, Apr 16 2017 *)
PROG
(PARI) A285114(n) = if(n<2, n+1, 2+sum(k=1, (n-1), bitxor(binomial(n-1, k-1), binomial(n-1, k))));
(Scheme)
(define (A285114 n) (add A285117 (A000217 n) (+ -1 (A000217 (+ 1 n)))))
(define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 16 2017
STATUS
approved