cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A238761 Subtriangle of the generalized ballot numbers, T(n,k) = A238762(2*k-1,2*n-1), 1<=k<=n, read by rows.

This page as a plain text file.
%I A238761 #17 Jul 10 2019 10:39:33
%S A238761 1,2,3,3,8,10,4,15,30,35,5,24,63,112,126,6,35,112,252,420,462,7,48,
%T A238761 180,480,990,1584,1716,8,63,270,825,1980,3861,6006,6435,9,80,385,1320,
%U A238761 3575,8008,15015,22880,24310,10,99,528,2002,6006,15015,32032,58344,87516,92378
%N A238761 Subtriangle of the generalized ballot numbers, T(n,k) = A238762(2*k-1,2*n-1), 1<=k<=n, read by rows.
%F A238761 T(n,n) = A001700(n-1).
%F A238761 T(n,n-1) = A162551(n-1).
%e A238761 [n\k 1   2    3    4    5    6     7 ]
%e A238761 [1]  1,
%e A238761 [2]  2,  3,
%e A238761 [3]  3,  8,  10,
%e A238761 [4]  4, 15,  30,  35,
%e A238761 [5]  5, 24,  63, 112, 126,
%e A238761 [6]  6, 35, 112, 252, 420,  462,
%e A238761 [7]  7, 48, 180, 480, 990, 1584, 1716.
%p A238761 binom2 := proc(n, k) local h;
%p A238761    h := n -> (n-((1-(-1)^n)/2))/2;
%p A238761    n!/(h(n-k)!*h(n+k)!) end:
%p A238761 A238761 := (n, k) -> binom2(n+k, n-k+1)*(n-k+1)/(n+k):
%p A238761 seq(print(seq(A238761(n, k), k=1..n)), n=1..7);
%t A238761 h[n_] := (n - ((1 - (-1)^n)/2))/2;
%t A238761 binom2[n_, k_] := n!/(h[n-k]! h[n+k]!);
%t A238761 T[n_, k_] := binom2[n+k, n-k+1] (n-k+1)/(n+k);
%t A238761 Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Jul 10 2019, from Maple *)
%o A238761 (Sage)
%o A238761 @CachedFunction
%o A238761 def ballot(p, q):
%o A238761     if p == 0 and q == 0: return 1
%o A238761     if p < 0 or p > q: return 0
%o A238761     S = ballot(p-2, q) + ballot(p, q-2)
%o A238761     if q % 2 == 1: S += ballot(p-1, q-1)
%o A238761     return S
%o A238761 A238761 = lambda n, k: ballot(2*k-1, 2*n-1)
%o A238761 for n in (1..7): [A238761(n, k) for k in (1..n)]
%Y A238761 Row sums are A002054.
%Y A238761 Cf. A001700, A009766.
%K A238761 nonn,tabl
%O A238761 1,2
%A A238761 _Peter Luschny_, Mar 05 2014