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.
%I A074911 #12 Nov 03 2022 05:47:18 %S A074911 1,2,2,6,4,6,24,10,10,24,120,34,20,34,120,720,154,54,54,154,720,5040, %T A074911 874,208,108,208,874,5040,40320,5914,1082,316,316,1082,5914,40320, %U A074911 362880,46234,6996,1398,632,1398,6996,46234,362880 %N A074911 Triangle generated by Pascal's rule, except begin and end the n-th row with n!. %H A074911 Reinhard Zumkeller, <a href="/A074911/b074911.txt">Rows n = 1..100 of table, flattened</a> %e A074911 Triangle begins: %e A074911 1; %e A074911 2, 2; %e A074911 6, 4, 6; %e A074911 24, 10, 10, 24; %e A074911 120, 34, 20, 34, 120; %e A074911 720, 154, 54, 54, 154, 720; %e A074911 5040, 874, 208, 108, 208, 874, 5040; %t A074911 T[n_, 1] := n!; %t A074911 T[n_, n_] := n!; %t A074911 T[n_, k_] /; 1<k<n := T[n, k] = T[n-1, k]+T[n-1, k-1]; %t A074911 Table[T[n, k], {n, 1, 9}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Nov 03 2022 *) %o A074911 (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));} %o A074911 tabl(nn) = {for (n=1, nn, for (k=1, n, print1(t(n, k), ", ");); print(););} \\ _Michel Marcus_, May 19 2013 %o A074911 (Haskell) %o A074911 a074911 n k = a074911_tabl !! (n-1) !! (k-1) %o A074911 a074911_row n = a074911_tabl !! (n-1) %o A074911 a074911_tabl = map fst $ iterate %o A074911 (\(vs, w:ws) -> (zipWith (+) ([w] ++ vs) (vs ++ [w]), ws)) %o A074911 ([1], tail a001563_list) %o A074911 -- _Reinhard Zumkeller_, Aug 05 2013 %Y A074911 Cf. A227550, A225621 (central terms). %K A074911 easy,nonn,tabl %O A074911 1,2 %A A074911 _Joseph L. Pe_, Oct 01 2002 %E A074911 More terms from _Michel Marcus_, May 19 2013