login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A285116 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) OR C(n-1,k), where C(n,k) is binomial coefficient (A007318) and OR is bitwise-OR (A003986). 4

%I #15 Apr 17 2017 09:03:02

%S 1,1,1,1,1,1,1,3,3,1,1,3,3,3,1,1,5,6,6,5,1,1,5,15,10,15,5,1,1,7,15,31,

%T 31,15,7,1,1,7,23,55,35,55,23,7,1,1,9,28,60,126,126,60,28,9,1,1,9,45,

%U 116,126,126,126,116,45,9,1,1,11,47,125,250,254,254,250,125,47,11,1,1,11,63,183,495,462,462,462,495,183,63,11,1

%N 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) OR C(n-1,k), where C(n,k) is binomial coefficient (A007318) and OR is bitwise-OR (A003986).

%H Antti Karttunen, <a href="/A285116/b285116.txt">Table of n, a(n) for n = 0..10439; the rows 0 - 143 of triangle</a>

%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>

%F T(0,n) = T(n,n) = 1; and for n > 0, 0 < k < n, T(n,k) = C(n-1,k-1) OR C(n-1,k), where C(n,k) is binomial coefficient (A007318) and OR is bitwise-OR (A003986).

%F T(n,k) = A285117(n,k) + A285118(n,k).

%F C(n,k) = T(n,k) + A285118(n,k). [Where C(n,k) = A007318.]

%e Rows 0 - 12 of the triangle:

%e 1,

%e 1, 1,

%e 1, 1, 1,

%e 1, 3, 3, 1,

%e 1, 3, 3, 3, 1,

%e 1, 5, 6, 6, 5, 1,

%e 1, 5, 15, 10, 15, 5, 1,

%e 1, 7, 15, 31, 31, 15, 7, 1,

%e 1, 7, 23, 55, 35, 55, 23, 7, 1,

%e 1, 9, 28, 60, 126, 126, 60, 28, 9, 1,

%e 1, 9, 45, 116, 126, 126, 126, 116, 45, 9, 1,

%e 1, 11, 47, 125, 250, 254, 254, 250, 125, 47, 11, 1,

%e 1, 11, 63, 183, 495, 462, 462, 462, 495, 183, 63, 11, 1

%t T[n_, k_]:= If[n==0 || n==k, 1, BitOr[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 *)

%o (Scheme)

%o (define (A285116 n) (A285116tr (A003056 n) (A002262 n)))

%o (define (A285116tr n k) (cond ((zero? k) 1) ((= k n) 1) (else (A003986tr (A007318tr (- n 1) (- k 1)) (A007318tr (- n 1) k))))) ;; Where A003986bi implements bitwise-OR (A003986) and A007318tr gives the binomial coefficients (A007318).

%o (PARI) T(n, k) = if (n==0 || n==k, 1, bitor(binomial(n - 1, k - 1), binomial(n - 1, k)));

%o for(n=0, 12, for(k=0, n, print1(T(n, k),", ");); print();) \\ _Indranil Ghosh_, Apr 16 2017

%Y Cf. A003986, A007318, A285117, A285118.

%Y Cf. A285113 (row sums).

%K nonn,tabl

%O 0,8

%A _Antti Karttunen_, Apr 16 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)