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.
Original entry on oeis.org
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
Offset: 0
-
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 *)
-
A285113(n) = if(n<2,n+1,2+sum(k=1,(n-1),bitor(binomial(n-1,k-1),binomial(n-1,k))));
-
(define (A285113 n) (add A285116 (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)))))))
A285115
Row sums of A285118: a(n) = Sum_{k=1..(n-1)} (C(n-1,k-1) bitwise-and C(n-1,k)), a(0) = a(1) = 0.
Original entry on oeis.org
0, 0, 1, 0, 5, 8, 12, 20, 49, 64, 304, 672, 1204, 2648, 3852, 9320, 18297, 32960, 75472, 146392, 304920, 577336, 1211144, 2034072, 4801892, 7637392, 18795944, 33811680, 71566612, 139144320, 285508328, 569229920, 1069209737, 2314296064, 4167725024, 8567738280, 16894013736, 33135107200, 68279466472, 121133055024
Offset: 0
-
a[n_]:=If[n<2, 0, Sum[BitAnd[Binomial[n - 1,k - 1], Binomial[n - 1, k]], {k, n - 1}]]; Table[a[n], {n, 0, 100}] (* Indranil Ghosh, Apr 16 2017 *)
-
A285115(n) = if(n<2,0,sum(k=1,(n-1),bitand(binomial(n-1,k-1),binomial(n-1,k))));
-
(define (A285115 n) (add A285118 (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)))))))
A285117
Triangle read by rows: T(0,n) = T(n,n) = 1; and for n > 0, 0 < k < n, T(n,k) = C(n-1,k-1) XOR C(n-1,k), where C(n,k) is binomial coefficient (A007318) and XOR is bitwise-XOR (A003987).
Original entry on oeis.org
1, 1, 1, 1, 0, 1, 1, 3, 3, 1, 1, 2, 0, 2, 1, 1, 5, 2, 2, 5, 1, 1, 4, 15, 0, 15, 4, 1, 1, 7, 9, 27, 27, 9, 7, 1, 1, 6, 18, 54, 0, 54, 18, 6, 1, 1, 9, 20, 36, 126, 126, 36, 20, 9, 1, 1, 8, 45, 112, 42, 0, 42, 112, 45, 8, 1, 1, 11, 39, 85, 170, 46, 46, 170, 85, 39, 11, 1, 1, 10, 60, 146, 495, 132, 0, 132, 495, 146, 60, 10, 1
Offset: 0
Rows 0 - 12 of the triangle:
1,
1, 1,
1, 0, 1,
1, 3, 3, 1,
1, 2, 0, 2, 1,
1, 5, 2, 2, 5, 1,
1, 4, 15, 0, 15, 4, 1,
1, 7, 9, 27, 27, 9, 7, 1,
1, 6, 18, 54, 0, 54, 18, 6, 1,
1, 9, 20, 36, 126, 126, 36, 20, 9, 1,
1, 8, 45, 112, 42, 0, 42, 112, 45, 8, 1,
1, 11, 39, 85, 170, 46, 46, 170, 85, 39, 11, 1,
1, 10, 60, 146, 495, 132, 0, 132, 495, 146, 60, 10, 1
-
T[n_, k_]:= If[n==0 || n==k, 1, BitXor[Binomial[n - 1, k - 1], Binomial[n - 1, k]]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Indranil Ghosh, Apr 16 2017 *)
-
T(n, k) = if (n==0 || n==k, 1, bitxor(binomial(n - 1, k - 1), binomial(n - 1, k)));
for(n=0, 12, for(k=0, n, print1(T(n, k),", ");); print();) \\ Indranil Ghosh, Apr 16 2017
-
(define (A285117 n) (A285117tr (A003056 n) (A002262 n)))
(define (A285117tr n k) (cond ((zero? k) 1) ((= k n) 1) (else (A003987tr (A007318tr (- n 1) (- k 1)) (A007318tr (- n 1) k))))) ;; Where A003987bi implements bitwise-XOR (A003987) and A007318tr gives the binomial coefficients (A007318).
Showing 1-3 of 3 results.