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

A116218 If X_1,...,X_n is a partition of a 2n-set X into 2-blocks (or pairs) then a(n) is equal to the number of permutations f of X such that f(X_i) != X_i for all i=1,...n.

Original entry on oeis.org

1, 0, 20, 592, 35088, 3252608, 437765440, 80766186240, 19580003614976, 6038002429456384, 2308538525796209664, 1071858241055770480640, 594103565746026102722560, 387504996819754568329494528, 293818792387460667662661926912, 256273357771747968541309427187712
Offset: 0

Views

Author

Milan Janjic, Apr 08 2007, corrected Apr 13 2007

Keywords

Crossrefs

Cf. A374980.

Programs

  • Maple
    a:=n->sum((-2)^i*binomial(n,i)*(2*n-2*i)!,i=0..n);
  • Mathematica
    Table[Sum[(-2)^i*Binomial[n,i]*(2*n-2*i)!,{i,0,n}],{n,1,20}] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    for(n=1,25, print1(sum(i=0,n, (-2)^i*binomial(n,i)*(2*n-2*i)!), ", ")) \\ G. C. Greubel, Mar 18 2017

Formula

a(n) = Sum_{i=0..n} (-2)^i*binomial(n,i)*(2*n-2*i)!.
Recurrence: a(n) = 2*(n-1)*(2*n+1)*a(n-1) + 4*(n-1)*(4*n-3)*a(n-2) + 16*(n-2)*(n-1)*a(n-3). - Vaclav Kotesovec, Mar 20 2014
a(n) ~ sqrt(Pi) * 2^(2*n+1) * n^(2*n+1/2) / exp(2*n). - Vaclav Kotesovec, Mar 20 2014

Extensions

a(0)=1 prepended by Alois P. Heinz, Aug 05 2024

A375223 a(n) is the number of permutations of the multiset 1,1, 2,2, ..., n,n such that at least one pair k,k stays at its initial locations 2k-1, 2k.

Original entry on oeis.org

1, 1, 16, 327, 11756, 644315, 50094570, 5245258879, 711662648968, 121448713262139, 25460198594647070, 6431844723440756015, 1927058631207405670716, 675631849624828664480107, 274032655042818911590547266, 127312224468011793400981895295, 67167619760422081463964260973200
Offset: 1

Views

Author

Hugo Pfoertner, Aug 05 2024

Keywords

Examples

			a(3) = 16: The 15 permutations with one stable pair (see A375222) and the starting configuration [1, 1, 2, 2, 3, 3].
		

Crossrefs

Cf. A000680 (all permutations of this multiset), A375222 (exactly one stable pair), A374980.

Programs

  • PARI
    a375223(n) = {my (p=vector(2*n,i,1+(i-1)\2), m=0); forperm (p, q, for (j=1, n, if (q[2*j-1]==j && q[2*j]==j, m++; break))); m}

Formula

a(n) = Sum_{j=1..n} binomial(n,j) * A374980(n-j). - Alois P. Heinz, Aug 05 2024

Extensions

a(8) onwards from Alois P. Heinz, Aug 05 2024

A375222 a(n) is the number of permutations of the multiset 1,1, 2,2, ..., n,n such that exactly one pair k,k stays at its initial locations 2k-1, 2k.

Original entry on oeis.org

1, 0, 15, 296, 10965, 609864, 47880595, 5047886640, 688359502089, 117929734950320, 24798753695076471, 6280419381186155160, 1885582606127524251805, 662239984799385248609976, 268999138538324585872798395, 125133475474486312764311243744, 66091677106419135401506827779985
Offset: 1

Views

Author

Hugo Pfoertner, Aug 05 2024

Keywords

Comments

1

Examples

			a(3) = 15: The permutations with one stable pair are
  [1, 1, 2, 3, 2, 3], [1, 1, 2, 3, 3, 2], [1, 1, 3, 2, 2, 3], [1, 1, 3, 2, 3, 2],
  [1, 1, 3, 3, 2, 2], [1, 2, 1, 2, 3, 3], [1, 2, 2, 1, 3, 3], [1, 3, 2, 2, 1, 3],
  [1, 3, 2, 2, 3, 1], [2, 1, 1, 2, 3, 3], [2, 1, 2, 1, 3, 3], [2, 2, 1, 1, 3, 3],
  [3, 1, 2, 2, 1, 3], [3, 1, 2, 2, 3, 1], [3, 3, 2, 2, 1, 1].
		

Crossrefs

Cf. A000680 (all permutations of this multiset), A375223 (at least one stable pair), A374980.

Programs

  • PARI
    a375222(n) = {my(p=vector(2*n,i,1+(i-1)\2), m1=0); forperm (p, q, my(m=0); for (k=1, n, if (q[2*k-1]==k && q[2*k]==k, m++)); m1+=(m==1)); m1}

Formula

a(n) = n * A374980(n-1). - Alois P. Heinz, Aug 05 2024

Extensions

a(8) onwards from Alois P. Heinz, Aug 05 2024

A375694 Number A(n,k) of multiset permutations of {{1}^k, {2}^k, ..., {n}^k} with no fixed k-tuple {j}^k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 5, 2, 0, 1, 0, 19, 74, 9, 0, 1, 0, 69, 1622, 2193, 44, 0, 1, 0, 251, 34442, 362997, 101644, 265, 0, 1, 0, 923, 756002, 62924817, 166336604, 6840085, 1854, 0, 1, 0, 3431, 17150366, 11729719509, 305225265804, 136221590695, 630985830, 14833, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 24 2024

Keywords

Examples

			A(2,2) = 5: 1212, 1221, 2112, 2121, 2211.
A(2,3) = 19: 112122, 112212, 112221, 121122, 121212, 121221, 122112, 122121, 122211, 211122, 211212, 211221, 212112, 212121, 212211, 221112, 221121, 221211, 222111.
A(3,2) = 74: 121323, 121332, 122313, 122331, 123123, 123132, 123213, 123231, 123312, 123321, 131223, 131232, 131322, 132123, 132132, 132312, 132321, 133122, 133212, 133221, 211323, 211332, 212313, 212331, 213123, 213132, 213213, 213231, 213312, 213321, 221313, 221331, 223113, 223131, 223311, 231123, 231132, 231213, 231231, 231312, 231321, 232113, 232131, 232311, 233112, 233121, 233211, 311223, 311232, 311322, 312123, 312132, 312312, 312321, 313122, 313212, 313221, 321123, 321132, 321213, 321231, 321312, 321321, 322113, 322131, 322311, 323112, 323121, 323211, 331122, 331212, 331221, 332112, 332121.
A(4,1) = 9: 2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321.
Square array A(n,k) begins:
  1,  1,      1,         1,            1,               1, ...
  0,  0,      0,         0,            0,               0, ...
  0,  1,      5,        19,           69,             251, ...
  0,  2,     74,      1622,        34442,          756002, ...
  0,  9,   2193,    362997,     62924817,     11729719509, ...
  0, 44, 101644, 166336604, 305225265804, 623302086965044, ...
		

Crossrefs

Columns k=0-2 give: A000007, A000166, A374980.
Rows n=0-2 give: A000012, A000004, A030662.
Main diagonal gives A375693.

Programs

  • Maple
    A:= (n, k)-> add((-1)^(n-j)*binomial(n, j)*(k*j)!/k!^j, j=0..n):
    seq(seq(A(n, d-n), n=0..d), d=0..10);

Formula

A(n,k) = Sum_{j=0..n} (-1)^(n-j)*binomial(n,j)*(k*j)!/k!^j.

A375219 T(n,k) is the number of permutations of the multiset {1, 1, 1, 2, 2, 2, ..., n, n, n} with k occurrences of fixed triples (j,j,j), where T(n,k), n >= 2, 0 <= k <= n-2 is a triangle read by rows.

Original entry on oeis.org

19, 1622, 57, 362997, 6488, 114, 166336604, 1814985, 16220, 190, 136221590695, 998019624, 5444955, 32440, 285, 181552310074386, 953551134865, 3493068684, 12704895, 56770, 399, 367942716863474473, 1452418480595088, 3814204539460, 9314849824, 25409790, 90832, 532
Offset: 2

Views

Author

Hugo Pfoertner, Aug 08 2024

Keywords

Comments

Trivially, T(n,n) = 1 and T(n,n-1) = 0.

Examples

			The triangle begins
         19;
       1622,      57;
     362997,    6488,   114,
  166336604, 1814985, 16220, 190;
.
T(2,0) = 19: the permutations of {1,1,1,2,2,2} with no fixed triples are
[1,1,2,1,2,2], [1,1,2,2,1,2], [1,1,2,2,2,1], [1,2,1,1,2,2], [1,2,1,2,1,2], [1,2,1,2,2,1], [1,2,2,1,1,2], [1,2,2,1,2,1], [1,2,2,2,1,1], [2,1,1,1,2,2], [2,1,1,2,1,2], [2,1,1,2,2,1], [2,1,2,1,1,2], [2,1,2,1,2,1], [2,1,2,2,1,1], [2,2,1,1,1,2], [2,2,1,1,2,1], [2,2,1,2,1,1], [2,2,2,1,1,1].
		

Crossrefs

Cf. A014606.
Cf. A374980, A375223 (columns 0 and 1 in a similar triangle for the multiset {1, 1, 2, 2, ..., n, n}).

Programs

  • PARI
    mima (x, n1=1, i2=-oo) = {my (n2, n=#x, mi=x[n1], ma=mi); n2=if (i2<=0, n, min(n,i2)); for (i=n1+1, n2, if (x[i]ma, ma=x[i]))); [mi,ma]};
    \\ returns row n of triangle, bsize is the block size in the multiset.
    a375219(n, bsize=3) = {my (p=vector(bsize*n, i, 1+(i-1)\bsize), r=s=vector(n), m=vector(n-1)); forperm (p, q, for (b=1, n, my (bm=bsize*(b-1), j=mima(q, bm+1, bm+bsize)); r[b]=j[1]; s[b]=j[2]); my (rs=vector(n, i, r[i]==i && s[i]==i)); for (k=0 ,n-2, m[k+1]+=vecsum(rs)==k)); m}

Formula

Sum_{j=0..n-2} T(n,j) = (3*n)!/(6^n) - 1 = A014606(n) - 1.

Extensions

More terms (three rows) from Alois P. Heinz, Aug 16 2024

A375220 T(n,k) is the number of permutations of the multiset {1, 1, 2, 2, ..., n, n} with k occurrences of fixed pairs (j,j), where T(n,k), n >= 2, 0 <= k <= n-2 is a triangle read by rows.

Original entry on oeis.org

5, 74, 15, 2193, 296, 30, 101644, 10965, 740, 50, 6840085, 609864, 32895, 1480, 75, 630985830, 47880595, 2134524, 76755, 2590, 105, 76484389121, 5047886640, 191522380, 5692064, 153510, 4144, 140, 11792973495032, 688359502089, 22715489880, 574567140, 12807144, 276318, 6216, 180
Offset: 2

Views

Author

Hugo Pfoertner, Aug 08 2024

Keywords

Examples

			The triangle begins
          5,
         74,       15,
       2193,      296,      30,
     101644,    10965,     740,    50,
    6840085,   609864,   32895,  1480,   75,
  630985830, 47880595, 2134524, 76755, 2590, 105
		

Crossrefs

Cf. A000217, A000680, A028895, A116218, A374980 (column 0), A375222 (column 1), A375223.
Cf. A375219 (similar for triples in the multiset).

Programs

  • PARI
    \\ using functions mima and a375219 from A375219, row n of triangle:
    a375219(n,sizeb=2)

Formula

T(n,n) = 1, T(n,n-1) = 0 (terms not in DATA),
T(n,n-2) = 5*n*(n-1)/2 = 5*A000217(n-1) = A028895(n-1),
Sum_{j=0..n-2} T(n,j) = (2*n)!/(2^n) - 1 = A000680(n) - 1,
Sum_{j=1..n-2} T(n,j) = A375223(n) - 1.
Showing 1-6 of 6 results.