|
|
A285113
|
|
Row sums of A285116: a(n) = 2 + Sum_{k=1..(n-1)} (C(n-1,k-1) bitwise-or C(n-1,k)), a(0) = 1, a(1) = 2.
|
|
4
|
|
|
1, 2, 3, 8, 11, 24, 52, 108, 207, 448, 720, 1376, 2892, 5544, 12532, 23448, 47239, 98112, 186672, 377896, 743656, 1519816, 2983160, 6354536, 11975324, 25917040, 48312920, 100406048, 196868844, 397726592, 788233496, 1578253728, 3225757559, 6275638528, 13012144160, 25792000088, 51825463000, 104303846272, 206598440472
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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) OR C(n-1,k), where C(n,k) is binomial coefficient and OR is bitwise-OR (A003986).
|
|
MATHEMATICA
|
a[n_]:=If[n<2, n + 1, 2 + Sum[BitOr[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) A285113(n) = if(n<2, n+1, 2+sum(k=1, (n-1), bitor(binomial(n-1, k-1), binomial(n-1, k))));
(Scheme)
(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
|
|
|
STATUS
|
approved
|
|
|
|