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 13 results. Next

A001754 Lah numbers: a(n) = n!*binomial(n-1,2)/6.

Original entry on oeis.org

0, 0, 1, 12, 120, 1200, 12600, 141120, 1693440, 21772800, 299376000, 4390848000, 68497228800, 1133317785600, 19833061248000, 366148823040000, 7113748561920000, 145120470663168000, 3101950060425216000, 69337707233034240000, 1617879835437465600000
Offset: 1

Views

Author

Keywords

Comments

a(n+1) = Sum_{pi in Symm(n)} Sum_{i=1..n} max(pi(i)-i,0)^2, i.e., the sum of the squares of the positive displacement of all letters in all permutations on n letters. - Franklin T. Adams-Watters, Oct 25 2006

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 156.
  • John Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 44.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 3 of A008297.
Column m=3 of unsigned triangle A111596.

Programs

  • Magma
    [Factorial(n)*Binomial(n-1, 2)/6: n in [1..25]]; // Vincenzo Librandi, Oct 11 2011
    
  • Maple
    [seq(n!*binomial(n-1,2)/6, n=1..40)];
  • Mathematica
    Table[(n-2)*(n-1)*n!/12, {n, 21}] (* Arkadiusz Wesolowski, Nov 26 2012 *)
    With[{nn=30},CoefficientList[Series[(x/(1-x))^3/6,{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Oct 04 2017 *)
  • Sage
    [factorial(n-1)*binomial(n,3)/2 for n in (1..30)] # G. C. Greubel, May 10 2021

Formula

E.g.f.: ((x/(1-x))^3)/3!.
If we define f(n,i,x) = Sum_{k=i..n} (Sum_{j=i..k} binomial(k,j) * Stirling1(n,k) * Stirling2(j,i)*x^(k-j)) then a(n+1) = (-1)^n*f(n,2,-4), n >= 2. - Milan Janjic, Mar 01 2009
a(n) = Sum_{k>=1} k * A260665(n,k). - Alois P. Heinz, Nov 14 2015
D-finite with recurrence (-n+5)*a(n) + (n-2)*(n-3)*a(n-1) = 0, n >= 4. - R. J. Mathar, Jan 06 2021
From Amiram Eldar, May 02 2022: (Start)
Sum_{n>=3} 1/a(n) = 6*(gamma - Ei(1)) + 9, where gamma = A001620 and Ei(1) = A091725.
Sum_{n>=3} (-1)^(n+1)/a(n) = 18*(gamma - Ei(-1)) - 12/e - 9, where Ei(-1) = -A099285 and e = A001113. (End)

A263776 Triangle read by rows: T(n,k) (n>=0, 0<=k<=A002620(n-1)) is the number of permutations of [n] with k nestings.

Original entry on oeis.org

1, 1, 2, 5, 1, 14, 8, 2, 42, 45, 25, 7, 1, 132, 220, 198, 112, 44, 12, 2, 429, 1001, 1274, 1092, 700, 352, 140, 42, 9, 1, 1430, 4368, 7280, 8400, 7460, 5392, 3262, 1664, 716, 256, 74, 16, 2, 4862, 18564, 38556, 56100, 63648, 59670, 47802, 33338, 20466, 11115
Offset: 0

Views

Author

Christian Stump, Oct 26 2015

Keywords

Comments

Row sums give A000142.
First column gives A000108.
Also the number of permutations of [n] with k crossings (see Corteel, Proposition 4).
Also the number of permutations of [n] with exactly k (possibly overlapping) occurrences of the generalized pattern 13-2 (alternatively: 2-13, 2-31, or 31-2). - Alois P. Heinz, Nov 14 2015

Examples

			Triangle begins:
0 :   1;
1 :   1;
2 :   2;
3 :   5,    1;
4 :  14,    8,    2;
5 :  42,   45,   25,    7,   1;
6 : 132,  220,  198,  112,  44,  12,   2;
7 : 429, 1001, 1274, 1092, 700, 352, 140, 42, 9, 1;
...
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(u-j, o+j-1), j=1..u)+
           add(expand(b(u+j-1, o-j)*x^(j-1)), j=1..o))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Nov 14 2015
  • Mathematica
    b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[u-j, o+j-1], {j, 1, u}] + Sum[Expand[b[u+j-1, o-j]*x^(j-1)], {j, 1, o}]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0]]; Table[ T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 31 2016, after Alois P. Heinz *)

Formula

Sum_{k>0} k * T(n,k) = A001754(n).
T(n,n) = A287328(n). - Alois P. Heinz, Aug 31 2017

Extensions

More terms from Alois P. Heinz, Oct 26 2015

A260670 Number T(n,k) of permutations of [n] with exactly k (possibly overlapping) occurrences of the generalized pattern 23-1; triangle T(n,k), n>=0, 0<=k<=A125811(n)-1, read by rows.

Original entry on oeis.org

1, 1, 2, 5, 1, 15, 6, 3, 52, 32, 23, 10, 3, 203, 171, 152, 98, 62, 22, 11, 1, 877, 944, 984, 791, 624, 392, 240, 111, 55, 18, 4, 4140, 5444, 6460, 6082, 5513, 4302, 3328, 2141, 1393, 780, 432, 187, 88, 24, 6, 21147, 32919, 43626, 46508, 46880, 41979, 36774
Offset: 0

Views

Author

Alois P. Heinz, Nov 14 2015

Keywords

Comments

Patterns 1-32, 3-12, 21-3 give the same sequence.

Examples

			T(3,1) = 1: 231.
T(4,1) = 6: 1342, 2314, 2413, 2431, 3241, 4231.
T(4,2) = 3: 2341, 3412, 3421.
T(5,2) = 23: 13452, 14523, 14532, 23415, 23514, 23541, 24351, 25341, 32451, 34125, 34152, 34215, 35124, 35142, 35214, 35412, 35421, 42351, 43512, 43521, 52341, 53412, 53421.
T(5,3) = 10: 23451, 24513, 24531, 34251, 35241, 45123, 45132, 45213, 45312, 45321.
T(5,4) = 3: 34512, 34521, 45231.
Triangle T(n,k) begins:
0 :   1;
1 :   1;
2 :   2;
3 :   5,   1;
4 :  15,   6,   3;
5 :  52,  32,  23,  10,   3;
6 : 203, 171, 152,  98,  62,  22,  11,   1;
7 : 877, 944, 984, 791, 624, 392, 240, 111, 55, 18, 4;
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o) option remember;
         `if`(u+o=0, 1, add(b(u-j, o+j-1), j=1..u)+
           add(expand(b(u+j-1, o-j)*x^u), j=1..o))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n,0)):
    seq(T(n), n=0..10);
  • Mathematica
    b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[u-j, o+j-1], {j, 1, u}] + Sum[Expand[b[u+j-1, o-j]*x^u], {j, 1, o}]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 16 2017, after Alois P. Heinz *)

Formula

Sum_{k>0} k * T(n,k) = A001754(n).

A092923 Number of permutations containing exactly one occurrence of the pattern #, with # one of {1-23, 3-21, 12-3, 32-1}.

Original entry on oeis.org

1, 7, 39, 211, 1168, 6728, 40561, 256297, 1696707, 11752973, 85047284, 641782220, 5041634549, 41160207335, 348664792199, 3059885806071, 27781291314396, 260599397789924, 2522492941426381, 25166308238897929, 258507111338795491, 2731176458973448817
Offset: 3

Views

Author

Ralf Stephan, Apr 18 2004

Keywords

Crossrefs

Column k=1 of A260665.

Programs

  • Mathematica
    a[n_ /; n<3] = 0; a[n_] := a[n] = 2 a[n-1] + Sum[Binomial[n-2, k] (a[k+1] + BellB[k+1]), {k, 0, n-3}];
    Table[a[n], {n, 3, 24}] (* Jean-François Alcover, Aug 19 2018 *)
  • PARI
    a(n)=if(n<1,0,2*a(n-1)+sum(k=0,n-3,binomial(n-2,k)*(a(k+1)+polcoeff(serlaplace(exp(exp(x)-1)),k+1))))

Formula

G.f.: Sum_{n>=1} (x/(1-n*x)) * Sum_{k>=0} k*x^(k+n)/Product_{l=1..k+n} (1-l*x).
Recurrence: a(n) = 2a(n-1) + Sum_{k=0..n-3} C(n-2, k)*(a(k+1) + B(k+1)), with B(n) the Bell numbers A000110(n).

A264451 Number of permutations of [n] with exactly two (possibly overlapping) occurrences of the generalized pattern 12-3.

Original entry on oeis.org

1, 13, 112, 843, 6089, 43887, 321357, 2411686, 18631631, 148490575, 1221894598, 10382648734, 91073271181, 824221683639, 7690752545310, 73932347642395, 731636916804531, 7447376286108705, 77913394499688645, 837113596053971008, 9229808681562243113
Offset: 4

Views

Author

Alois P. Heinz, Nov 14 2015

Keywords

Examples

			a(4) = 1: 1243.
a(5) = 13: 13254, 13524, 13542, 14235, 21354, 23154, 23514, 23541, 24135, 31254, 34125, 41253, 51243.
		

Crossrefs

Column k=2 of A260665.

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1, add(
           b(u-j, o+j-1), j=1..u)+add(convert(series(
           b(u+j-1, o-j)*x^(o-j), x, 3), polynom), j=1..o))
        end:
    a:= n-> coeff(b(n, 0), x, 2):
    seq(a(n), n=4..25);

A264452 Number of permutations of [n] with exactly three (possibly overlapping) occurrences of the generalized pattern 12-3.

Original entry on oeis.org

1, 12, 103, 811, 6273, 48806, 386041, 3122069, 25900188, 220791812, 1935811756, 17461471292, 162038542377, 1546528485770, 15174625184321, 152994813139537, 1584120732683571, 16834244135840106, 183496533502593453, 2050337555698723711, 23470542944212951050
Offset: 4

Views

Author

Alois P. Heinz, Nov 14 2015

Keywords

Examples

			a(4) = 1: 1234.
a(5) = 12: 12534, 12543, 13245, 13425, 13452, 21345, 23145, 23415, 23451, 31245, 41235, 51234.
		

Crossrefs

Column k=3 of A260665.

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1, add(
           b(u-j, o+j-1), j=1..u)+add(convert(series(
           b(u+j-1, o-j)*x^(o-j), x, 4), polynom), j=1..o))
        end:
    a:= n-> coeff(b(n, 0), x, 3):
    seq(a(n), n=4..25);

A264453 Number of permutations of [n] with exactly four (possibly overlapping) occurrences of the generalized pattern 12-3.

Original entry on oeis.org

2, 41, 492, 4851, 44291, 394154, 3502159, 31450283, 287335089, 2680535274, 25586566853, 250169461829, 2506738712869, 25745302689807, 270994937686871, 2922760610595872, 32288420619988347, 365214362676429903, 4227719744153328064, 50063651356822568135
Offset: 5

Views

Author

Alois P. Heinz, Nov 14 2015

Keywords

Crossrefs

Column k=4 of A260665.

A264454 Number of permutations of [n] with exactly five (possibly overlapping) occurrences of the generalized pattern 12-3.

Original entry on oeis.org

1, 24, 337, 3798, 38795, 379611, 3659389, 35291284, 343556139, 3394140548, 34141603945, 350367304972, 3672490264985, 39344027488644, 430933818393770, 4825995839698429, 55254816421477438, 646659542446548212, 7733703865241542989, 94486241595833611364
Offset: 5

Views

Author

Alois P. Heinz, Nov 14 2015

Keywords

Crossrefs

Column k=5 of A260665.

A264455 Number of permutations of [n] with exactly six (possibly overlapping) occurrences of the generalized pattern 12-3.

Original entry on oeis.org

1, 17, 238, 2956, 33343, 355182, 3681762, 37839385, 389940538, 4056942189, 42796503464, 458995025669, 5013561835833, 55832699192796, 634322118799677, 7354538207075076, 87032355679553323, 1051183375285792257, 12956782873283747998, 162950022525866642259
Offset: 5

Views

Author

Alois P. Heinz, Nov 14 2015

Keywords

Examples

			a(5) = 1: 12345.
a(6) = 17: 124365, 124635, 124653, 125346, 132456, 134256, 134526, 134562, 213456, 231456, 234156, 234516, 234561, 312456, 412356, 512346, 612345.
		

Crossrefs

Column k=6 of A260665.

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1, add(
           b(u-j, o+j-1), j=1..u)+add(convert(series(
           b(u+j-1, o-j)*x^(o-j), x, 7), polynom), j=1..o))
        end:
    a:= n-> coeff(b(n, 0), x, 6):
    seq(a(n), n=5..25);

A264456 Number of permutations of [n] with exactly seven (possibly overlapping) occurrences of the generalized pattern 12-3.

Original entry on oeis.org

5, 122, 1960, 25922, 308912, 3488684, 38438284, 420224213, 4604712333, 50891058160, 569534211553, 6470640729869, 74755213239764, 879145839345147, 10531462769901577, 128554339635477023, 1599307831822386125, 20278763016658278490, 262052769447634167173
Offset: 6

Views

Author

Alois P. Heinz, Nov 14 2015

Keywords

Examples

			a(6) = 5: 123645, 123654, 124356, 124536, 124563.
a(7) = 122: 1253746, 1253764, 1254376, ..., 7124356, 7124536, 7124563.
		

Crossrefs

Column k=7 of A260665.

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1, add(
           b(u-j, o+j-1), j=1..u)+add(convert(series(
           b(u+j-1, o-j)*x^(o-j), x, 8), polynom), j=1..o))
        end:
    a:= n-> coeff(b(n, 0), x, 7):
    seq(a(n), n=6..25);
Showing 1-10 of 13 results. Next