login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A125175
Triangle T(n,k) = |A053123(n/2+k/2,k)| for even n+k, T(n,k)= A082985((n+k-1)/2,k) for odd n+k; read by rows, 0<=k<=n.
2
1, 1, 2, 1, 3, 3, 1, 4, 5, 4, 1, 5, 10, 7, 5, 1, 6, 14, 20, 9, 6, 1, 7, 21, 30, 35, 11, 7, 1, 8, 27, 56, 55, 56, 13, 8, 1, 9, 36, 77, 126, 91, 84, 15, 9, 1, 10, 44, 120, 182, 252, 140, 120, 17, 10, 1, 11, 55, 156, 330, 378, 462, 204, 165, 19, 11
OFFSET
0,3
FORMULA
T(n,k) = binomial(n+1,k) if n+k even. T(n,k) = binomial(n-1,k)*(n+k)/(n-k) if n+k odd. - R. J. Mathar, Sep 08 2013
EXAMPLE
First few rows of the triangle are:
1;
1, 2;
1, 3, 3;
1, 4, 5, 4;
1, 5, 10, 7, 5;
1, 6, 14, 20, 9, 6;
1, 7, 21, 30, 35, 11, 7;
1, 8, 27, 56, 55, 56, 13, 8;
1, 9, 36, 77, 126, 91, 84, 15, 9; ...
MAPLE
A125175 := proc(n, k)
if type(n+k, 'even') then
binomial(n+1, k) ;
else
binomial(n-1, k)*(n+k)/(n-k) ;
end if;
end proc: # R. J. Mathar, Sep 08 2013
MATHEMATICA
Table[If[EvenQ[n+k], Binomial[n+1, k], Binomial[n-1, k]*(n+k)/(n-k)], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jun 05 2019 *)
PROG
(PARI) {T(n, k) = if((n+k)%2==0, binomial(n+1, k), binomial(n-1, k)* (n+k)/(n-k))}; \\ G. C. Greubel, Jun 05 2019
(Magma) [[ k eq n select n+1 else (n+k mod 2) eq 0 select Binomial(n+1, k) else Binomial(n-1, k)*(n+k)/(n-k): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jun 05 2019
(Sage)
def T(n, k):
if (mod(n+k, 2)==0): return binomial(n+1, k)
else: return binomial(n-1, k)* (n+k)/(n-k)
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jun 05 2019
CROSSREFS
Cf. A053123, A082985, A125176 (row sums).
Sequence in context: A377000 A210489 A344821 * A210552 A193376 A185095
KEYWORD
nonn,tabl,easy
AUTHOR
Gary W. Adamson, Nov 22 2006
STATUS
approved