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-10 of 15 results. Next

A196687 n!*A062868(n).

Original entry on oeis.org

1, 4, 24, 336, 5520, 203040, 7025760, 510370560, 30163311360, 3577017024000, 319851801561600, 55850407258060800, 7021439018770176000, 1692163531361176473600, 284409062346887622144000, 90395009213694143422464000, 19571060809440210728706048000, 7929132907666579072319471616000
Offset: 1

Views

Author

Jan Lakota, Oct 04 2011

Keywords

Comments

Let p = (p1..pn) and q = (q1..qn) be two random permutations of (1..n); call the pair (p,q) balanced if the number of i with pi > qi is the same as the number of i with pi < qi. Then a(n) is the number of balanced pairs.

Crossrefs

Extensions

a(1)-a(6) computed by Jan Lakota; extended by N. J. A. Sloane, Oct 04 2011

A062866 Triangle of number of permutations by barycenter.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 1, 4, 14, 4, 1, 1, 5, 31, 46, 31, 5, 1, 1, 6, 66, 146, 282, 146, 66, 6, 1, 1, 7, 134, 392, 1289, 1394, 1289, 392, 134, 7, 1, 1, 8, 267, 960, 4859, 7736, 12658, 7736, 4859, 960, 267, 8, 1, 1, 9, 529, 2235, 16615, 34659, 85831, 83122, 85831, 34659, 16615, 2235, 529, 9, 1
Offset: 0

Views

Author

Olivier Gérard, Jun 26 2001

Keywords

Comments

The barycenter or signcenter of a permutation is the sum of the signs of the difference between initial and final positions of the objects.

Examples

			(1,3,2,5,7,6,4) has difference (0,1,-1,1,2,0,-3) and signs (0,1,-1,1,1,0,-1) with total 1. This is one of 1289 such permutations of degree 7.
Triangle begins:
:                                  1                              ;
:                                  1                              ;
:                                  2                              ;
:                           1,     4,    1                        ;
:                     1,    4,    14,    4,    1                  ;
:               1,    5,   31,    46,   31,    5,   1             ;
:          1,   6,   66,  146,   282,  146,   66,   6,   1        ;
:     1,   7, 134,  392, 1289,  1394, 1289,  392, 134,   7, 1     ;
:  1, 8, 267, 960, 4859, 7736, 12658, 7736, 4859, 960, 267, 8, 1  ;
		

Crossrefs

Columns k=0-4 give: A062868, A179562, A169934, A179564, A179565.
Row sums give A000142.

Programs

  • Maple
    b:= proc(s, t) option remember; (n-> `if`(n=0, x^t,
          add(b(s minus {j}, t+signum(n-j)), j=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b({$1..n}, 0)):
    seq(T(n), n=0..11);  # Alois P. Heinz, Jul 31 2018
  • Mathematica
    row[n_] := Sort[Tally[Total[Sign[# - Range[n]]]& /@ Permutations[Range[n]] ]][[All, 2]]; Array[row, 9] // Flatten (* Jean-François Alcover, Oct 07 2016 *)

Formula

From Alois P. Heinz, Jul 31 2018: (Start)
T(n,k) = T(n,-k).
Sum_{k>=0} T(n,k) = A179566(n). (End)
Conjecture: e.g.f.: Sum_{n>=0} Sum_{k} T(n,k) * t^k * z^n / n! = (1-t^2) * exp(z) / (exp(t*z) - t^2 * exp(z/t)). - Robert S. Maier, Jan 17 2025

A263744 T(n,k)=Number of length n arrays of permutations of 0..n-1 with each element moved by -k to k places and equal numbers of elements moved upwards and downwards.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 4, 5, 1, 2, 4, 10, 8, 1, 2, 4, 14, 19, 13, 1, 2, 4, 14, 36, 43, 21, 1, 2, 4, 14, 46, 110, 90, 34, 1, 2, 4, 14, 46, 214, 277, 202, 55, 1, 2, 4, 14, 46, 282, 664, 823, 434, 89, 1, 2, 4, 14, 46, 282, 1118, 2516, 2292, 971, 144, 1, 2, 4, 14, 46, 282, 1394, 5962
Offset: 1

Views

Author

R. H. Hardin, Oct 25 2015

Keywords

Comments

Table starts
..1...1....1.....1......1......1......1......1......1......1......1......1
..2...2....2.....2......2......2......2......2......2......2......2......2
..3...4....4.....4......4......4......4......4......4......4......4......4
..5..10...14....14.....14.....14.....14.....14.....14.....14.....14.....14
..8..19...36....46.....46.....46.....46.....46.....46.....46.....46.....46
.13..43..110...214....282....282....282....282....282....282....282....282
.21..90..277...664...1118...1394...1394...1394...1394...1394...1394...1394
.34.202..823..2516...5962..10090..12658..12658..12658..12658..12658..12658
.55.434.2292..7989..21974..44914..68834..83122..83122..83122..83122..83122
.89.971.6862.30299.100324.266476.535262.816882.985730.985730.985730.985730

Examples

			Some solutions for n=7 k=4
..3....3....0....2....3....4....2....0....3....4....2....3....3....3....1....1
..1....0....4....1....1....5....1....2....0....0....3....2....4....2....2....5
..0....4....5....0....2....3....6....4....2....3....6....0....6....1....0....2
..4....1....1....3....0....0....5....1....4....1....1....1....1....0....5....0
..2....5....3....5....4....2....0....3....6....5....0....4....0....4....3....6
..5....2....6....4....6....1....4....5....1....2....5....5....5....5....4....3
..6....6....2....6....5....6....3....6....5....6....4....6....2....6....6....4
		

Crossrefs

Column 1 is A000045(n+1)
Diagonal is A062868

A062867 Triangle read by rows: entries give numbers of permutations of [1..n] by absolute barycenter.

Original entry on oeis.org

1, 1, 2, 4, 2, 14, 8, 2, 46, 62, 10, 2, 282, 292, 132, 12, 2, 1394, 2578, 784, 268, 14, 2, 12658, 15472, 9718, 1920, 534, 16, 2, 83122, 171662, 69318, 33230, 4470, 1058, 18, 2, 985730, 1282604, 964544, 276044, 107660, 10100, 2096, 20, 2, 8012962, 17465978, 8199268, 4851200, 1022824, 337988, 22396, 4160, 22, 2
Offset: 0

Views

Author

Olivier Gérard, Jun 26 2001

Keywords

Comments

The barycenter or signcenter of a permutation is the sum of the signs of the difference between initial and final positions of the objects.

Examples

			[1], [2], [4, 2], [14, 8, 2], [46, 62, 10, 2], [282, 292, 132, 12, 2], ...
(1,6,2,3,4,5,7) has difference (0,5,-1,-1,-1,-1,0) and signs (0,1,-1,-1,-1,-1,0) with total -3, absolute value is 3. This is one of 268 such permutations of degree 7.
Triangle T(n,k) begins:
       1;
       1;
       2;
       4,       2;
      14,       8,      2;
      46,      62,     10,      2;
     282,     292,    132,     12,      2;
    1394,    2578,    784,    268,     14,     2;
   12658,   15472,   9718,   1920,    534,    16,    2;
   83122,  171662,  69318,  33230,   4470,  1058,   18,  2;
  985730, 1282604, 964544, 276044, 107660, 10100, 2096, 20, 2;
		

Crossrefs

Column k=0 gives A062868.
Row sums give A000142.
Cf. A062866.

Programs

  • Maple
    b:= proc(s, t) option remember; (n-> `if`(n=0, x^t,
          add(b(s minus {j}, t+signum(n-j)), j=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)*`if`(i=0, 1, 2), i=0..degree(p)))(b({$1..n}, 0)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Jul 31 2018
  • Mathematica
    b[s_, t_] := b[s, t] = With[{n = Length[s]}, If[n == 0, x^t, Sum[b[s  ~Complement~ {j}, t + Sign[n - j]], {j, s}]]];
    T[n_] := With[{p = b[Range[n], 0]}, Table[Coefficient[p, x, i]*If[i == 0, 1, 2], {i, 0, Exponent[p, x]}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 25 2021, after Alois P. Heinz *)

Formula

T(n,0) = A062868(n) = A062866(n,0), T(n,k) = 2 * A062866(n,k) for k>0. - Alois P. Heinz, Jul 31 2018

Extensions

More terms from Vladeta Jovovic, Jun 29 2001

A320337 a(n) = A271697(2*n, n).

Original entry on oeis.org

1, 1, 7, 161, 7631, 607009, 72605303, 12172272321, 2722634203807, 783282749905601, 281751782666559239, 123890976070562785633, 65380371270827869603439, 40779819387085820255904481, 29677003954344675666092048791, 24921035407468294238607282809729
Offset: 0

Views

Author

Maxwell Jiang, Dec 18 2018 (added without permission by editors)

Keywords

Comments

Central coefficients of the triangles A046739 and A271697.

Crossrefs

Programs

  • Maple
    a := n -> add((-1)^(n-k)*combinat:-eulerian1(n+k,n)*binomial(2*n,n-k), k=0..n): seq(a(n), n=0..15); # Peter Luschny, Dec 19 2018
  • Mathematica
    E1[n_ /; n >= 0, 0] = 1; E1[n_, k_] /; k < 0 || k > n = 0; E1[n_, k_] := E1[n, k] = (n - k) E1[n - 1, k - 1] + (k + 1) E1[n - 1, k];
    a[n_] := Sum[(-1)^(n - k) E1[n + k, n] Binomial[2 n, n - k], {k, 0, n}];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Dec 30 2018, after Peter Luschny *)

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k)*E(n+k, n)*binomial(2*n,n-k) where E are the Eulerian numbers A173018. - Peter Luschny, Dec 19 2018
a(n) ~ sqrt(3) * 2^(2*n + 1) * n^(2*n) / exp(2*n + 1). - Vaclav Kotesovec, Dec 19 2018

A169934 Number of permutations of 1..n with the number moved left exceeding the number moved right by 2.

Original entry on oeis.org

0, 0, 0, 1, 5, 66, 392, 4859, 34659, 482272, 4099634, 65762489, 653977909, 12026621478, 137361430156, 2862534403223, 36968414699239, 862935261673212, 12440701298168534, 321935664074780549, 5126628962937663529, 145768013651370381026, 2541561479354892816304
Offset: 1

Views

Author

R. H. Hardin, Jul 19 2010

Keywords

Crossrefs

Column k=2 (or k=-2) of A062866.
Equal number moved left and right, see A062868.

Extensions

a(19)-a(20) from Alois P. Heinz, Jul 31 2018
a(21)-a(23) from Alois P. Heinz, Apr 28 2024

A179562 Number of permutations of 1..n with the number moved left exceeding the number moved right by 1.

Original entry on oeis.org

0, 0, 1, 4, 31, 146, 1289, 7736, 85831, 641302, 8732989, 78432212, 1270475155, 13338831858, 250740220345, 3013809363056, 64512904742895, 873589792390382, 20982459271174517, 316070362138732172, 8418423492219771211, 139628838506569935338, 4084524856346911809777
Offset: 1

Views

Author

R. H. Hardin, Jul 19 2010

Keywords

Crossrefs

Column k=1 (or k=-1) of A062866.
Equal number moved left and right, see A062868.

Extensions

a(19)-a(20) from Alois P. Heinz, Jul 31 2018
a(21)-a(23) from Alois P. Heinz, Apr 28 2024

A179567 Number of permutations of 1..n with the number moved left exceeding the number moved right by 1 or more.

Original entry on oeis.org

0, 0, 1, 5, 37, 219, 1823, 13831, 139879, 1321535, 15951919, 181202031, 2549722415, 33883956911, 545091050671, 8301190456511, 150332113604031, 2581953013032639
Offset: 1

Views

Author

R. H. Hardin Jul 19 2010

Keywords

Crossrefs

Equal number moved left and right, see A062868.
Equals (n!-A062868(n))/2.

A196688 ((n!)^2-A196687(n))/2.

Original entry on oeis.org

0, 0, 6, 120, 4440, 157680, 9187920, 557665920, 50759291520, 4795586208000, 636749560339200, 86796062772249600, 15877174512431232000, 2953945462595410483200, 712801595188655900928000, 173684063741850454560768000, 53471242848053479728254976000, 16530628080065352033845256192000
Offset: 1

Views

Author

Jan Lakota, Oct 04 2011

Keywords

Comments

Let p = (p1..pn) and q = (q1..qn) be two random permutations of (1..n); call the pair (p,q) positive if the number of i with pi > qi is greater than the number of i with pi < qi. Then a(n) is the number of positive pairs.

Crossrefs

Cf. A062868, A196687. Equals n!*A179567(n).

Extensions

a(1)-a(6) computed by Jan Lakota; extended by N. J. A. Sloane, Oct 04 2011

A179564 Number of permutations of 1..n with the number moved left exceeding the number moved right by 3.

Original entry on oeis.org

0, 0, 0, 0, 1, 6, 134, 960, 16615, 138022, 2425600, 23279224, 444500577, 4880181294, 102914967458, 1277238809792, 29767443364523, 412889949481670, 10588965173821348, 162515224089696984, 4560137456338593333, 76773519570724122126, 2343258977445039475014
Offset: 1

Views

Author

R. H. Hardin, Jul 19 2010

Keywords

Crossrefs

Column k=3 (or k=-3) of A062866.
Equal number moved left and right, see A062868.

Extensions

a(19)-a(20) from Alois P. Heinz, Jul 31 2018
a(21)-a(23) from Alois P. Heinz, Apr 28 2024
Showing 1-10 of 15 results. Next