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

A370390 Number of permutations of [n] whose longest block is of length 2. A block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions.

Original entry on oeis.org

0, 0, 1, 2, 10, 53, 334, 2428, 20009, 184440, 1881050, 21034905, 255967940, 3367720736, 47641219569, 721160081974, 11631770791362, 199159952915293, 3607908007376418, 68946510671942892, 1386140583681969289, 29247292475233307612, 646231776371742321826
Offset: 0

Views

Author

Seiichi Manyama, Feb 17 2024

Keywords

Crossrefs

Column k=2 of A184182.

Programs

  • PARI
    my(N=30, x='x+O('x^N)); concat([0, 0], Vec(sum(k=0, N, k!*x^k*(((1-x^2)/(1-x^3))^k-((1-x)/(1-x^2))^k))))

Formula

a(n) = A002628(n) - A000255(n-1).
G.f.: Sum_{k>=0} k! * x^k * ( ((1-x^2)/(1-x^3))^k - ((1-x)/(1-x^2))^k ).

A184180 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} whose shortest block is of length k (1 <= k <= n). A block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions. For example, the permutation 4512367 has 3 blocks: 45, 123, and 67. Its shortest block has length 2.

Original entry on oeis.org

1, 1, 1, 5, 0, 1, 22, 1, 0, 1, 117, 2, 0, 0, 1, 713, 5, 1, 0, 0, 1, 5026, 11, 2, 0, 0, 0, 1, 40285, 31, 2, 1, 0, 0, 0, 1, 362799, 73, 5, 2, 0, 0, 0, 0, 1, 3628584, 201, 11, 2, 1, 0, 0, 0, 0, 1, 39916243, 532, 20, 2, 2, 0, 0, 0, 0, 0, 1, 479000017, 1534, 40, 5, 2, 1, 0, 0, 0, 0, 0, 1, 6227016356, 4346, 82, 11, 2, 2, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Emeric Deutsch, Feb 13 2011

Keywords

Comments

Sum of entries in row n is n!.
T(n,1) = A184181(n).

Examples

			T(5,2) = 2 because we have 45123 and 34512.
Triangle starts:
    1;
    1, 1;
    5, 0, 1;
   22, 1, 0, 1;
  117, 2, 0, 0, 1;
  713, 5, 1, 0, 0, 1;
  ...
		

Crossrefs

Programs

  • Maple
    d[0] := 1: for n to 40 do d[n] := n*d[n-1]+(-1)^n end do: T := proc (n, k) options operator, arrow: sum(binomial(n-(k-1)*m-1, m-1)*(d[m]+d[m-1]), m = 1 .. floor(n/k))-(sum(binomial(n-k*m-1, m-1)*(d[m]+d[m-1]), m = 1 .. floor(n/(k+1)))) end proc: for n to 13 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := With[{d = Subfactorial},
       Sum[Binomial[n-(k-1)*m-1, m-1]*(d[m] + d[m-1]), {m, 1, Floor[n/k]}] -
       Sum[Binomial[n-k*m-1, m-1]*(d[m] + d[m-1]), {m, 1, Floor[n/(k+1)]}]];
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 18 2024, after Maple code *)

Formula

T(n,k) = Sum_{m=1..floor(n/k)} binomial(n-(k-1)*m-1, m-1)*(d(m) + d(m-1)) - Sum_{m=1..floor(n/(k+1))} binomial(n-km-1, m-1)*(d(m) + d(m-1)), where d(j) = A000166(j) are the derangement numbers.

A370383 Number of permutations of [n] having no substring [k,k+1,k+2,k+3,k+4].

Original entry on oeis.org

1, 1, 2, 6, 24, 119, 717, 5026, 40242, 362376, 3625081, 39885851, 478714416, 6224078292, 87145277160, 1307271652917, 20917481850667, 355612235468396, 6401234296266540, 121626707638142280, 2432586885636105251, 51085230669413519349, 1123891538655073251190
Offset: 0

Views

Author

Seiichi Manyama, Feb 17 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*((x-x^5)/(1-x^5))^k))

Formula

G.f.: Sum_{k>=0} k! * ( (x-x^5)/(1-x^5) )^k.
a(n) = Sum_{k=0..4} A184182(n,k). - Alois P. Heinz, Feb 17 2024

A370384 Number of permutations of [n] having no substring [k,k+1,k+2,k+3,k+4,k+5].

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 719, 5037, 40306, 362802, 3628296, 39913080, 478970641, 6226733531, 87175347936, 1307641346772, 20922387099240, 355682119243320, 6402298503373917, 121643960874649867, 2432883613692550316, 51090627024035616300, 1123995015882951892680
Offset: 0

Views

Author

Seiichi Manyama, Feb 17 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*((x-x^6)/(1-x^6))^k))

Formula

G.f.: Sum_{k>=0} k! * ( (x-x^6)/(1-x^6) )^k.
a(n) = Sum_{k=0..5} A184182(n,k). - Alois P. Heinz, Feb 17 2024

A370392 Number of permutations of [n] whose longest block is of length 3. A block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions.

Original entry on oeis.org

0, 0, 0, 1, 2, 11, 63, 415, 3121, 26402, 248429, 2575936, 29198926, 359351878, 4773277246, 68078349863, 1037820312090, 16842621113247, 289946286959875, 5277826030457339, 101291053229162471, 2044252472193005928, 43283094591188747415, 959369370636209414390
Offset: 0

Views

Author

Seiichi Manyama, Feb 17 2024

Keywords

Crossrefs

Column k=3 of A184182.

Programs

  • PARI
    my(N=30, x='x+O('x^N)); concat([0, 0, 0], Vec(sum(k=0, N, k!*x^k*(((1-x^3)/(1-x^4))^k-((1-x^2)/(1-x^3))^k))))

Formula

a(n) = A132647(n) - A002628(n).
G.f.: Sum_{k>=0} k! * x^k * ( ((1-x^3)/(1-x^4))^k - ((1-x^2)/(1-x^3))^k ).
Showing 1-5 of 5 results.