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.

Previous Showing 11-14 of 14 results.

A370505 T(n,k) is the difference between the number of k-dist-increasing and (k-1)-dist-increasing permutations of [n], where p is k-dist-increasing if k>=0 and p(i)=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 5, 6, 12, 0, 1, 9, 20, 30, 60, 0, 1, 19, 70, 90, 180, 360, 0, 1, 34, 175, 420, 630, 1260, 2520, 0, 1, 69, 490, 1960, 2520, 5040, 10080, 20160, 0, 1, 125, 1554, 5880, 15120, 22680, 45360, 90720, 181440, 0, 1, 251, 3948, 21000, 88200, 113400, 226800, 453600, 907200, 1814400
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2024

Keywords

Examples

			T(0,0) = 1: (only) the empty permutation is 0-dist-increasing.
T(4,2) = 5 = 6 - 1 = |{1234, 1243, 1324, 2134, 2143, 3142}| - |{1234}|.
Permutation 3142 is 2-dist-increasing and 4-dist-increasing but not 3-dist-increasing.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   2,    3;
  0, 1,   5,    6,   12;
  0, 1,   9,   20,   30,    60;
  0, 1,  19,   70,   90,   180,   360;
  0, 1,  34,  175,  420,   630,  1260,  2520;
  0, 1,  69,  490, 1960,  2520,  5040, 10080, 20160;
  0, 1, 125, 1554, 5880, 15120, 22680, 45360, 90720, 181440;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A014495.
Row sums give A000142.
Main diagonal gives A001710.
T(2n,n+1) gives A000680 for n>=1.
T(2n,n) gives A370576.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k<1,
         `if`(n=k, 1, 0), n!/mul(iquo(n+i, k)!, i=0..k-1))
        end:
    T:= (n, k)-> b(n, k)-b(n, k-1):
    seq(seq(T(n, k), k=0..n), n=0..10);

Formula

T(n,k) = A248686(n,k) - A248686(n,k-1) for k>=2.
Sum_{k=0..n} (1+n-k) * T(n,k) = A248687(n) for n>=1.

A370506 T(n,k) is the number permutations p of [n] that are j-dist-increasing for exactly k distinct values j in [n], where p is j-dist-increasing if j>=0 and p(i)=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 2, 1, 0, 11, 8, 4, 1, 0, 55, 38, 19, 7, 1, 0, 319, 228, 110, 50, 12, 1, 0, 2233, 1574, 775, 322, 115, 20, 1, 0, 17641, 12524, 6216, 2611, 1033, 261, 33, 1, 0, 158769, 112084, 55692, 23585, 9103, 3006, 586, 54, 1, 0, 1578667, 1119496, 556754, 238425, 91764, 33929, 8372, 1304, 88, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2024

Keywords

Examples

			T(4,1) = 11: 2341, 2431, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321.
T(4,2) = 8: 1342, 1423, 1432, 2314, 2413, 3124, 3142, 3214.
T(4,3) = 4: 1243, 1324, 2134, 2143.
T(4,4) = 1: 1234.
Triangle T(n,k) begins:
  1;
  0,      1;
  0,      1,      1;
  0,      3,      2,     1;
  0,     11,      8,     4,     1;
  0,     55,     38,    19,     7,    1;
  0,    319,    228,   110,    50,   12,    1;
  0,   2233,   1574,   775,   322,  115,   20,   1;
  0,  17641,  12524,  6216,  2611, 1033,  261,  33,  1;
  0, 158769, 112084, 55692, 23585, 9103, 3006, 586, 54, 1;
  ...
		

Crossrefs

Column k=0 gives A000007.
Column k=1 gives A370514 or A370507(n,n) for n>=1.
Row sums give A000142.
T(n,n-1) gives A000071(n+1).

Programs

  • Maple
    q:= proc(l, k) local i; for i from 1 to nops(l)-k do
          if l[i]>=l[i+k] then return 0 fi od; 1
        end:
    b:= proc(n) option remember; add(x^add(
          q(l, j), j=1..n), l=combinat[permute](n))
        end:
    T:= (n, k)-> coeff(b(n), x, k):
    seq(seq(T(n,k), k=0..n), n=0..8);
  • Mathematica
    q[l_, k_] := Module[{i}, For[i = 1, i <= Length[l]-k, i++,
        If[l[[i]] >= l[[i+k]], Return@0]]; 1];
    b[n_] := b[n] = Sum[x^Sum[q[l, j], {j, 1, n}], {l, Permutations[Range[n]]}];
    T[n_, k_] := Coefficient[b[n], x, k];
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 24 2024, after Alois P. Heinz *)

Formula

Sum_{k=0..n} k * T(n,k) = A248687(n) for n>=1.

A376455 a(n) = least k such that n^(2k+1)/(2k+1)! < 1.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26, 27, 28, 30, 31, 32, 34, 35, 36, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 61, 62, 64, 65, 66, 68, 69, 70, 72, 73, 74, 76, 77, 78, 80, 81, 83, 84, 85, 87, 88
Offset: 0

Views

Author

Clark Kimberling, Oct 17 2024

Keywords

Comments

The numbers n^(2k+1)/(2k+1)! are the coefficients in the Maclaurin series for sin x when x = 1. If m>a(n), then n^(2k+1)/(2k+1)! < 1.

Crossrefs

Programs

  • Mathematica
    a[n_] := Select[Range[z], n^(2 # + 1)/(2 # + 1)! < 1 &, 1]
    Flatten[Table[a[n], {n, 0, 100}]]

A370514 Number of permutations p of [n] such that for each distance d in [n-1] there is at least one index i in [n-d] with p(i)>p(i+d).

Original entry on oeis.org

1, 1, 1, 3, 11, 55, 319, 2233, 17641, 158769, 1578667, 17365337, 207865289, 2702248757, 37786779669, 566801695035, 9063808803203, 154084749654451
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2024

Keywords

Examples

			a(0) = 1: the empty permutation.
a(1) = 1: 1.
a(2) = 1: 21.
a(3) = 3: 231, 312, 321.
a(4) = 11: 2341, 2431, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321.
a(5) = 55: 23451, 23541, 24351, 24531, ..., 54213, 54231, 54312, 54321.
a(6) = 319: 234561, 234651, 235461, 235641, ..., 654213, 654231, 654312, 654321.
		

Crossrefs

Main diagonal of A370507.
Column k=1 of A370506 (for n>=1).
Cf. A008302.

Formula

a(n) = A370507(n,n).
a(n) = A370506(n,1) for n>=1.

Extensions

a(14)-a(16) from Martin Ehrenstein, Feb 22 2024
a(17) from Alois P. Heinz, Feb 22 2024
Previous Showing 11-14 of 14 results.