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.

Showing 1-2 of 2 results.

A074911 Triangle generated by Pascal's rule, except begin and end the n-th row with n!.

Original entry on oeis.org

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, 40320, 5914, 1082, 316, 316, 1082, 5914, 40320, 362880, 46234, 6996, 1398, 632, 1398, 6996, 46234, 362880
Offset: 1

Views

Author

Joseph L. Pe, Oct 01 2002

Keywords

Examples

			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;
		

Crossrefs

Cf. A227550, A225621 (central terms).

Programs

  • 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
  • Mathematica
    T[n_, 1] := n!;
    T[n_, n_] := n!;
    T[n_, k_] /; 1Jean-François Alcover, Nov 03 2022 *)
  • 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
    

Extensions

More terms from Michel Marcus, May 19 2013

A227791 Central terms of the triangle in A227550.

Original entry on oeis.org

1, 2, 8, 36, 176, 940, 5568, 37128, 280992, 2410812, 23250080, 249164344, 2934303264, 37617633976, 521009920256, 7748175156240, 123095897716800, 2080205257723740, 37253560076385120, 704703668205036120, 14039778681732928800, 293831851498842784680
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 05 2013

Keywords

Crossrefs

Programs

  • Haskell
    a227791 n = a227550 (2 * n) n
  • Maple
    b:= proc(x, y) option remember; `if`(x=0, y!,
          b(x-1, y)+b(sort([x, y-1])[]))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..26);  # Alois P. Heinz, Jul 14 2021
  • Mathematica
    T[n_, 0] := n!; T[n_, n_] := n!;
    T[n_, k_] /; 0Jean-François Alcover, Nov 03 2022 *)

Formula

a(n) = A074911(2*n,n).
Showing 1-2 of 2 results.