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.

A199204 Irregular triangle read by rows: the n-th row being a probability distribution based on n!.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 2, 3, 6, 6, 3, 2, 1, 1, 2, 3, 4, 6, 8, 12, 24, 24, 12, 8, 6, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120, 120, 60, 40, 30, 24, 20, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1
Offset: 2

Views

Author

Daniel Tisdale, Nov 03 2011

Keywords

Comments

Each row of triangle has 2^(n-1) terms.
The n-th row is built by multiplying the elements of the nonempty subsets of [n-1], sorting, removing the duplicates, and appending the reversed version. Equivalently, the n-th row is also given by the positive divisors of (n-1)! listed in increasing order (A079210), appending the reversed version. - Stefano Spezia, Aug 17 2022

Examples

			The first five rows are:
n=2: 1 1
n=3: 1 2 2 1
n=4: 1 2 3 6 6 3  2  1
n=5: 1 2 3 4 6 8 12 24 24 12 8 6 4 3 2 1
		

Crossrefs

Cf. A079210.

Programs

  • Mathematica
    Multiply[s_]:=Product[Part[s,i], {i,Length[s]}]; nmax=6; a={}; For[n=2, n<=nmax, n++, b=DeleteDuplicates[Sort[Table[Multiply[Part[Subsets[Drop[Range[n-1], 1]], i]], {i, 2^Length[Range[n-2]]}]]]; AppendTo[a, Join[b, Reverse[b]]]]; a (* or *)
    nmax=6; a={};For[n=2,n<=nmax,n++, b=Divisors[(n-1)!]; AppendTo[a,Join[b,Reverse[b]]]]; a (* Stefano Spezia, Aug 17 2022 *)

Formula

A closed form for the sequence is: S_n =(1/n!) Sum {(n-1)!/{(n-1)^i(n-2)^j...2^q 1^r} (ij...qr = 00...00 to 11...11) where ij...qr is a base-2 number whose n-1 digits appear as exponents in the sum.