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

A374980 Number of multiset permutations of {1, 1, 2, 2, ..., n, n} with no fixed pair (j,j).

Original entry on oeis.org

1, 0, 5, 74, 2193, 101644, 6840085, 630985830, 76484389121, 11792973495032, 2254432154097861, 523368281765512930, 145044815855963403985, 47302856057098946329284, 17933275902554972391519893, 7820842217155394547769452734, 3887745712142302082441578104705
Offset: 0

Views

Author

Alois P. Heinz, Aug 05 2024

Keywords

Comments

Inverse binomial transform of A000680.

Examples

			a(2) = 5: 1212, 1221, 2112, 2121, 2211.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1, 0, 5][n+1],
         (n-1)*((2*n+1)*a(n-1)+(4*n-3)*a(n-2)+2*(n-2)*a(n-3)))
        end:
    seq(a(n), n=0..16);

Formula

a(n) = Sum_{j=0..n} (-1)^j*binomial(n,j)*A000680(n-j).
a(n) = A116218(n)/2^n.
a(n) mod 2 = 1 - (n mod 2) = A059841(n).

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

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