OFFSET
1,2
LINKS
Reinhard Zumkeller, Rows n = 1..100 of table, flattened
EXAMPLE
Triangle begins:
1;
2, 2;
6, 4, 6;
24, 10, 10, 24;
120, 34, 20, 34, 120;
720, 154, 54, 54, 154, 720;
5040, 874, 208, 108, 208, 874, 5040;
MATHEMATICA
T[n_, 1] := n!;
T[n_, n_] := n!;
T[n_, k_] /; 1<k<n := T[n, k] = T[n-1, k]+T[n-1, k-1];
Table[T[n, k], {n, 1, 9}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 03 2022 *)
PROG
(PARI) t(n, k) = {if (k<1 || k>n, return (0)); if (k==1 || k==n, return (n!)); return (t(n-1, k-1) + t(n-1, k)); }
tabl(nn) = {for (n=1, nn, for (k=1, n, print1(t(n, k), ", "); ); print(); ); } \\ Michel Marcus, May 19 2013
(Haskell)
a074911 n k = a074911_tabl !! (n-1) !! (k-1)
a074911_row n = a074911_tabl !! (n-1)
a074911_tabl = map fst $ iterate
(\(vs, w:ws) -> (zipWith (+) ([w] ++ vs) (vs ++ [w]), ws))
([1], tail a001563_list)
-- Reinhard Zumkeller, Aug 05 2013
CROSSREFS
KEYWORD
AUTHOR
Joseph L. Pe, Oct 01 2002
EXTENSIONS
More terms from Michel Marcus, May 19 2013
STATUS
approved