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-7 of 7 results.

A130478 Triangle T(n,k) = n! / A130477(n,k).

Original entry on oeis.org

1, 2, 2, 6, 3, 2, 24, 8, 3, 2, 120, 30, 8, 3, 2, 720, 144, 30, 8, 3, 2, 5040, 840, 144, 30, 8, 3, 2, 40320, 5760, 840, 144, 30, 8, 3, 2, 362880, 45360, 5760, 840, 144, 30, 8, 3, 2, 3628800, 403200, 45360, 5760, 840, 144, 30, 8, 3, 2
Offset: 1

Views

Author

Gary W. Adamson, May 31 2007

Keywords

Comments

Sums of reciprocals of rows is 1. - Henry Bottomley, Nov 05 2009

Examples

			First few rows of the triangle:
     1;
     2,   2;
     6,   3,   2;
    24,   8,   3,  2;
   120,  30,   8,  3, 2;
   720, 144,  30,  8, 3, 2;
  5040, 840, 144, 30, 8, 3, 2;
  ...
Row 4 = (24, 8, 3, 2), terms such that (24, 8, 3, 2) dot (1, 3, 8, 12) = (24, 24, 24, 24), where (1, 3, 8, 12) = row 4 of A130477 and (24, 24, 24, 24) = row 4 of A130493.
Row 5 = (120, 30, 8, 3, 2) = 5! + (4!+3!) + (3!+2!) + (2!+1!) + (1!+1).
Row 5 = 120 followed by the first reversed 4 terms of A001048; i.e., 120 followed by 30, 8, 3, 2.
		

Crossrefs

Cf. A130493 (row sums), A001048, A130493, A130477.

Formula

T(n,k) = n! / A130477(n,k); such that by rows as vector terms, (n-th row of A130477) dot (n-th row of A130478) = n-th row of A130493 = n! repeated n times.
Triangle by rows = n! followed by the first (n-1) reversed terms of A001048: (2, 3, 8, 30, 144, 840, ...).
Left border = (1, 2, 6, 24, 120, ...); while all other columns = A001048: (2, 3, 8, 30, ...).
n-th row of the triangle = n terms of: (n!; (n-1)!+(n-2)!; (n-2)!+(n-3)!; ...; 1! + 0!).

Extensions

Corrected and extended by Henry Bottomley, Nov 05 2009

A092582 Triangle read by rows: T(n,k) is the number of permutations p of [n] having length of first run equal to k.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 12, 8, 3, 1, 60, 40, 15, 4, 1, 360, 240, 90, 24, 5, 1, 2520, 1680, 630, 168, 35, 6, 1, 20160, 13440, 5040, 1344, 280, 48, 7, 1, 181440, 120960, 45360, 12096, 2520, 432, 63, 8, 1, 1814400, 1209600, 453600, 120960, 25200, 4320, 630, 80, 9, 1
Offset: 1

Views

Author

Emeric Deutsch and Warren P. Johnson (wjohnson(AT)bates.edu), Apr 10 2004

Keywords

Comments

Row sums are the factorial numbers (A000142). First column is A001710.
T(n,k) = number of permutations of [n] in which 1,2,...,k is a subsequence but 1,2,...,k,k+1 is not. Example: T(4,2)=8 because 1324, 1342, 1432, 4132, 3124, 3142, 3412 and 4312, are the only permutations of [4] in which 12 is a subsequence but 123 is not. - Emeric Deutsch, Nov 12 2004
T(n,k) is the number of deco polyominoes of height n with k cells in the last column. (A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column). - Emeric Deutsch, Jan 06 2005
T(n,k) is the number of permutations p of [n] for which the smallest i such that p(i)Emeric Deutsch, Feb 23 2008
Adding columns 2,4,6,... one obtains the derangement numbers 0,1,2,9,44,... (A000166). See the Bona reference (p. 118, Exercises 41,42). - Emeric Deutsch, Feb 23 2008
Matrix inverse of A128227*A154990. - Mats Granvik, Feb 08 2009
Differences in the columns of A173333 which counts the n-permutations with an initial ascending run of length at least k. - Geoffrey Critzer, Jun 18 2017
The triangle with each row reversed is A130477. - Michael Somos, Jun 25 2017

Examples

			T(4,3) = 3 because 1243, 1342 and 2341 are the only permutations of [4] having length of first run equal to 3.
     1;
     1,    1;
     3,    2,   1;
    12,    8,   3,   1;
    60,   40,  15,   4,  1;
   360,  240,  90,  24,  5,  1;
  2520, 1680, 630, 168, 35,  6,  1;
  ...
		

References

  • M. Bona, Combinatorics of Permutations, Chapman&Hall/CRC, Boca Raton, Florida, 2004.

Crossrefs

Programs

  • GAP
    Flat(List([1..11],n->Concatenation([1],List([1..n-1],k->Factorial(n)*k/Factorial(k+1))))); # Muniru A Asiru, Jun 10 2018
    
  • Magma
    A092582:= func< n,k | k eq n select 1 else k*Factorial(n)/Factorial(k+1) >;
    [A092582(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Sep 06 2022
    
  • Mathematica
    Drop[Drop[Abs[Map[Select[#, # < 0 &] &, Map[Differences, nn = 10; Range[0, nn]! CoefficientList[Series[(Exp[y x] - 1)/(1 - x), {x, 0, nn}], {x, y}]]]], 1], -1] // Grid (* Geoffrey Critzer, Jun 18 2017 *)
  • PARI
    {T(n, k) = if( n<1 || k>n, 0, k==n, 1, n! * k /(k+1)!)}; /* Michael Somos, Jun 25 2017 */
    
  • SageMath
    def A092582(n,k): return 1 if (k==n) else k*factorial(n)/factorial(k+1)
    flatten([[A092582(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Sep 06 2022

Formula

T(n, k) = n!*k/(k+1)! for k
Inverse of:
1;
-1, 1;
-1, -2, 1;
-1, -2, -3, 1;
-1, -2, -3, -4, 1;
... where A002260 = (1; 1,2; 1,2,3; ...). - Gary W. Adamson, Feb 22 2012
T(2n,n) = A092956(n-1) for n>0. - Alois P. Heinz, Jun 19 2017
From Alois P. Heinz, Dec 17 2021: (Start)
Sum_{k=1..n} k * T(n,k) = A002627(n).
|Sum_{k=1..n} (-1)^k * T(n,k)| = A055596(n) for n>=1. (End)
From G. C. Greubel, Sep 06 2022: (Start)
T(n, 1) = A001710(n).
T(n, 2) = 2*A001715(n) + [n=2]/3, n >= 2.
T(n, 3) = 3*A001720(n) + [n=3]/4, n >= 3.
T(n, 4) = 4*A001725(n) + [n=4]/5, n >= 4.
T(n, n-1) = A000027(n-1).
T(n, n-2) = A005563(n-1), n >= 3. (End)
Sum_{k=0..n} (k+1) * T(n,k) = A000522(n). - Alois P. Heinz, Apr 28 2023

A130460 Infinite lower triangular matrix,(1,0,0,0,...) in the main diagonal and (1,2,3,...) in the subdiagonal.

Original entry on oeis.org

1, 1, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0
Offset: 1

Author

Gary W. Adamson, May 28 2007

Keywords

Comments

Given M = this sequence as an infinite lower triangular matrix and V = any sequence as a column vector, then M*V is the concatenation of the first term of V with the dot product of (1, 2, 3, ...) and V.

Examples

			First few rows of the triangle:
  1;
  1, 0;
  0, 2, 0;
  0, 0, 3, 0;
  0, 0, 0, 4, 0;
  0, 0, 0, 0, 5, 0;
  ...
		

Crossrefs

Formula

A natural number operator as an infinite lower triangular matrix M. (1,0,0,0,...) in the main diagonal, (1,2,3,...) in the subdiagonal and the rest zeros.

Extensions

a(5) corrected by Gionata Neri, Jun 22 2016

A130493 Triangle read by rows in which row n contains n! repeated n times.

Original entry on oeis.org

1, 2, 2, 6, 6, 6, 24, 24, 24, 24, 120, 120, 120, 120, 120, 720, 720, 720, 720, 720, 720, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 40320, 40320, 40320, 40320, 40320, 40320, 40320, 40320, 362880, 362880, 362880, 362880, 362880, 362880, 362880, 362880, 362880
Offset: 1

Author

Gary W. Adamson, May 31 2007

Keywords

Comments

Row sums = A001563: (1, 4, 18, 96, 600, 4320, ...). A130477(n,k) * A130478(n,k) = A130493(n,k). Example: take dot products of rows with equal numbers of terms in A130477 and A130478, (1, 3, 8, 12) dot (24, 8, 3, 2) = (24, 24, 24, 24).

Examples

			First few rows of the triangle:
   1;
   2,  2;
   6,  6,  6;
  24, 24, 24, 24;
  ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[n!,{n}],{n,10}]] (* Harvey P. Dale, Dec 24 2014 *)
    Table[PadRight[{},n,n!],{n,10}]//Flatten (* Harvey P. Dale, Jul 04 2022 *)
  • Python
    from math import isqrt
    from sympy import factorial
    def A130493(n): return factorial((m:=isqrt(k:=n<<1))+(k>m*(m+1))) # Chai Wah Wu, Nov 07 2024

Formula

Triangle, n! repeated n times per row.

Extensions

More terms from Sean A. Irvine, Jul 19 2022

A130461 Triangle, antidiagonals of an array generated from A130460.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 2, 6, 4, 1, 1, 1, 2, 6, 12, 5, 1, 1, 1, 2, 6, 24, 20, 6, 1, 1, 1, 2, 6, 24, 60, 30, 7, 1, 1, 1, 2, 6, 24, 120, 120, 42, 8, 1, 1, 1, 2, 6, 24, 120, 360, 210, 56, 9, 1, 1, 1, 2, 6, 24, 120, 720, 840, 336, 72, 10, 1, 1, 1, 2, 6, 24, 120, 720, 2520
Offset: 0

Author

Gary W. Adamson, May 28 2007

Keywords

Comments

Rows tend to the factorials: (1, 1, 2, 6, 24, ...). Row sums = A130476: (1, 2, 3, 5, 8, 15, 28, 61, 132, ...).

Examples

			The array =
  1, 1, 1, 1,  1,   1, ...
  1, 1, 2, 3,  4,   5, ...
  1, 1, 2, 6, 12,  20, ...
  1, 1, 2, 6, 24,  60, ...
  1, 1, 2, 6, 24, 120, ...
  1, 1, 2, 6, 24, 120, ...
  ...
First few rows of the triangle:
  1;
  1, 1;
  1, 1, 1;
  1, 1, 2, 1;
  1, 1, 2, 3,  1;
  1, 1, 2, 6,  4,  1;
  1, 1, 2, 6, 12,  5,  1;
  1, 1, 2, 6, 24, 20,  6, 1;
  1, 1, 2, 6, 24, 60, 30, 7, 1;
  ...
		

Crossrefs

Formula

Let A130460 = M, an infinite lower triangular matrix and V = [1, 1, 1, ...], the first row of an array. Perform M * V = second row, ...; (n+1)-th row = M * n-th row. The triangle = antidiagonals of the array.

Extensions

a(23) and a(38) corrected by Gionata Neri, Jun 22 2016

A130476 Row sums of triangle A130461.

Original entry on oeis.org

1, 2, 3, 5, 8, 15, 28, 61, 132, 325, 790, 2133, 5680, 16501
Offset: 1

Author

Gary W. Adamson, May 28 2007

Keywords

Examples

			a(6) = 15 = (1 + 1 + 2 + 6 + 4 + 1), sum of row 6 terms in triangle A130461.
		

Crossrefs

A277855 Irregular triangle read by rows: T(n,k) is the maximum length of the longest common subsequence of k distinct permutations of n items with n>=1 and 1<=k<=n!

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 1, 1, 1, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Author

Cees H. Elzinga, Nov 02 2016

Keywords

Comments

The formulas given below are correct. The sequence can be used to normalize the length of the longest common subsequence of a set of k full preference orderings relative to the maximum attainable length. This normalized number is a measure of concordance in the set of preference orderings.
The run lengths are given by A130477. - Andrey Zabolotskiy, Nov 02 2016

Examples

			The permutations {abc, acb} have 2 longest common subsequences of length 2: ab and ac. The permutations {abc, acb, cab} have one longest common subsequence: ab of length 2. The formula above yields T(3,3)= 2.
The triangle begins:
1
2,1
3,2,2,1,1,1
4,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1
5,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,...
		

Crossrefs

A277517: the maximum number of common subsequences of k distinct permutations of n items.
A152072: the maximum number of length-k longest common subsequences of a pair of length-n strings.

Programs

  • Mathematica
    Flatten[Table[(n - Select[Range@ n, Function[j, Binomial[n, n - j + 1] (j - 1)! + 1 <= k <= Binomial[n, n - j] j!]]) /. {} -> {n}, {n, 5}, {k, n!}], {3}] // Flatten (* Michael De Vlieger, Nov 04 2016 *)

Formula

T(n,1)=n.
For n>1, 1<=k<=n! and 1<=j<=n, T(n,k)=n-j if binomial(n,n-j+1)*(j-1)!+1<=k<=binomial(n,n-j)*j!.
Showing 1-7 of 7 results.