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.

Previous Showing 81-90 of 261 results. Next

A319501 Number T(n,k) of sets of nonempty words with a total of n letters over k-ary alphabet such that all k letters occur at least once in the set; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 0, 2, 12, 13, 0, 2, 38, 105, 73, 0, 3, 110, 588, 976, 501, 0, 4, 302, 2811, 8416, 9945, 4051, 0, 5, 806, 12354, 59488, 121710, 111396, 37633, 0, 6, 2109, 51543, 375698, 1185360, 1830822, 1366057, 394353, 0, 8, 5450, 207846, 2209276, 10096795, 23420022, 28969248, 18235680, 4596553
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 2018

Keywords

Examples

			T(2,2) = 3: {ab}, {ba}, {a,b}.
T(3,2) = 12: {aab}, {aba}, {abb}, {baa}, {bab}, {bba}, {a,ab}, {a,ba}, {a,bb}, {aa,b}, {ab,b}, {b,ba}.
T(4,2) = 38: {aaab}, {aaba}, {aabb}, {abaa}, {abab}, {abba}, {abbb}, {baaa}, {baab}, {baba}, {babb}, {bbaa}, {bbab}, {bbba}, {a,aab}, {a,aba}, {a,abb}, {a,baa}, {a,bab}, {a,bba}, {a,bbb}, {aa,ab}, {aa,ba}, {aa,bb}, {aaa,b}, {aab,b}, {ab,ba}, {ab,bb}, {aba,b}, {abb,b}, {b,baa}, {b,bab}, {b,bba}, {ba,bb}, {a,aa,b}, {a,ab,b}, {a,b,ba}, {a,b,bb}.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,    3;
  0, 2,   12,    13;
  0, 2,   38,   105,     73;
  0, 3,  110,   588,    976,     501;
  0, 4,  302,  2811,   8416,    9945,    4051;
  0, 5,  806, 12354,  59488,  121710,  111396,   37633;
  0, 6, 2109, 51543, 375698, 1185360, 1830822, 1366057, 394353;
		

Crossrefs

Columns k=0-10 give: A000007, A000009 (for n>0), A320203, A320204, A320205, A320206, A320207, A320208, A320209, A320210, A320211.
Main diagonal gives A000262.
Row sums give A319518.
T(2n,n) gives A319519.

Programs

  • Maple
    h:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(h(n-i*j, i-1, k)*binomial(k^i, j), j=0..n/i)))
        end:
    T:= (n, k)-> add((-1)^i*binomial(k, i)*h(n$2, k-i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    h[n_, i_, k_] := h[n, i, k] = If[n==0, 1, If[i<1, 0, Sum[h[n-i*j, i-1, k]* Binomial[k^i, j], {j, 0, n/i}]]];
    T[n_, k_] := Sum[(-1)^i Binomial[k, i] h[n, n, k-i], {i, 0, k}];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 05 2020, after Alois P. Heinz *)

Formula

T(n,k) = Sum_{i=0..k} (-1)^i * C(k,i) * A292804(n,k-i).

A088368 G.f. satisfies: A(x) = Sum_{n>=0} n!*x^n*A(x)^n.

Original entry on oeis.org

1, 1, 3, 13, 69, 421, 2867, 21477, 175769, 1567273, 15213955, 160727997, 1846282381, 23013527421, 310284575683, 4506744095141, 70199956070705, 1167389338452753, 20636801363971139, 386304535988493101, 7630926750477398037, 158584458024427667669
Offset: 0

Views

Author

Paul D. Hanna, Sep 28 2003

Keywords

Comments

a(n) = number of partitions of [n] into sets of noncrossing lists. For example, a(4) = 69 counts the 73 partitions of [n] into sets of lists (A000262) except for 13-24, 13-42, 31-24, 31-42 which are crossing. - David Callan, Jul 25 2008

Examples

			G.f.: A(x) = 1 + x + 3*x^2 + 13*x^3 + 69*x^4 + 421*x^5 + 2867*x^6 +...
where
A(x) = 1 + x*A(x) + 2!*x^2*A(x)^2 + 3!*x^3*A(x)^3 + 4!*x^4*A(x)^4 +...
Related expansions:
A(x)^2 = 1 + 2*x + 7*x^2 + 32*x^3 + 173*x^4 + 1058*x^5 +...
A(x)^3 = 1 + 3*x + 12*x^2 + 58*x^3 + 321*x^4 + 1977*x^5 +...
A(x)^4 = 1 + 4*x + 18*x^2 + 92*x^3 + 523*x^4 + 3256*x^5 +...
A(x)^5 = 1 + 5*x + 25*x^2 + 135*x^3 + 790*x^4 + 4986*x^5 +...
		

Crossrefs

Cf. A198916.

Programs

  • Mathematica
    FrequencyDistribution[list_List] := Module[{set = Union[list]}, Table[{set[[i]], Count[list, set[[i]]]}, {i, Length[set]}]]; a[0] = 1; a[n_]/;n>=1 := a[n] = Apply[Plus,Module[{frequencies},Map[(frequencies=Map[Last,FrequencyDistribution[ # ]]; Sum[frequencies]!*Apply[Multinomial,frequencies]* Product[Map[a,# ]])&,Partitions[n]-1 ]]] Table[a[n],{n,0,15}] - David Callan, Jul 25 2008
  • PARI
    {a(n)=polcoeff(1/x*serreverse(x/sum(m=0,n,m!*x^m)+x^2*O(x^n)),n)}
    for(n=0, 30, print1(a(n),", "))
    
  • PARI
    /* Recursive continued fraction: */
    {a(n)=local(A=1+x,CF=1+x*O(x^(n+2))); for(i=1,n, for(k=1, n+1, CF=1/(1-((n-k+1)\2+1)*x*A*CF));A=CF); polcoeff(A,n)}
    for(n=0, 30, print1(a(n),", "))
    
  • PARI
    /* Differential Equation */
    {a(n) = my(A=1+x); for(i=0,n, A = 1 + x*A*(x*A^2)'/(x*A+ x^2*O(x^n))' ); polcoeff(A,n)}
    for(n=0, 30, print1(a(n),", ")) \\ Paul D. Hanna, Apr 01 2018

Formula

G.f.: A(x) = (1/x)*Series_Reversion( x/[Sum_{n>=0} n!*x^n] ).
G.f. satisfies: A(x) = 1/(1 - x*A(x)/(1 - x*A(x)/(1 - 2*x*A(x)/(1 - 2*x*A(x)/(1 - 3*x*A(x)/(1 - 3*x*A(x)/(1 - 4*x*A(x)/(1 - ...)))))))), a recursive continued fraction.
G.f. satisfies: A(x/F(x)) = F(x) where F(x) = Sum_{n>=0} n!*x^n.
G.f. A(x) satisfies: A = 1 + x*A(x) * (x*A(x)^2)' / (x*A(x))'. - Paul D. Hanna, Apr 01 2018
a(n) ~ exp(1) * n!. - Vaclav Kotesovec, Apr 10 2019

A270294 E.g.f.: Product_{k>=1} (1 + sinh(x^k)).

Original entry on oeis.org

1, 1, 2, 13, 48, 381, 3120, 26923, 255696, 3158137, 40008240, 519979791, 7942304040, 122856625477, 2131578891624, 39647280625891, 750423985762080, 15134456564892273, 334165931467245216, 7422976578858122647, 177254117413133743800, 4454974632071621551741
Offset: 0

Views

Author

Vaclav Kotesovec, Mar 21 2016

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 25; Range[0, nmax]!*CoefficientList[Series[Product[1+Sinh[x^k], {k, 1, nmax}], {x, 0, nmax}], x]

A002873 The maximal number of partitions of {1..2n} that are invariant under a permutation consisting of n 2-cycles, and which have the same number of nonempty parts.

Original entry on oeis.org

1, 1, 3, 10, 53, 265, 1700, 13097, 96796, 829080, 8009815, 75604892, 808861988, 9175286549, 106167118057, 1320388106466, 16950041305210, 233232366601078, 3243603207488124, 47776065074368313, 733990397879859192, 11515503147927664816, 189107783918416912912
Offset: 0

Views

Author

Keywords

Comments

Previous name was: Sorting numbers (see Motzkin article for details).
Since a(n) by definition is the largest among some positive integers, whose sum is A002872(n), we always have the relation a(n) <= A002872(n); and for n > 0 the inequality is strict, since then that sum consists of more than one term. - Jörgen Backelin, Jan 13 2016

Examples

			There are three partitions of {1,2,3,4} into two (nonempty) parts, and which are invariant under the permutation (1,2)(3,4), namely {{1,2}, {3,4}}, {{1,3}, {2,4}}, and {{1,4}, {2,3}}. There are also one such partition with just one part, two with three parts, and one with four parts; but three is the largest of these amounts. Thus, a(2) = 3.
Similarly, there are ten (1,2)(3,4)(5,6) invariant partitions of {1,2,3,4,5,6} into three nonempty parts, and no larger amount into any other given number of parts, whence a(3) = 10.
		

References

  • 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

Cf. A000262 (the parent sequence of this family), A002872.
Maximum row values of A293181.

Extensions

Name changed and example added by Jörgen Backelin, Jan 13 2016
a(7)-a(8) from Sean A. Irvine, Jun 19 2016
a(9)-a(22) from Andrew Howroyd, Oct 01 2017

A102661 Triangle of partial sums of Stirling numbers of 2nd kind (A008277): T(n,k) = Sum_{i=1..k} Stirling2(n,i), 1<=k<=n.

Original entry on oeis.org

1, 1, 2, 1, 4, 5, 1, 8, 14, 15, 1, 16, 41, 51, 52, 1, 32, 122, 187, 202, 203, 1, 64, 365, 715, 855, 876, 877, 1, 128, 1094, 2795, 3845, 4111, 4139, 4140, 1, 256, 3281, 11051, 18002, 20648, 21110, 21146, 21147, 1, 512, 9842, 43947, 86472, 109299, 115179, 115929, 115974, 115975
Offset: 1

Views

Author

Vladeta Jovovic, Feb 03 2005

Keywords

Comments

T(n,k) is the number of ways to place n distinguishable balls into k indistinguishable bins. - Geoffrey Critzer, Mar 22 2011
From Mark Wildon, Aug 10 2015: (Start)
T(n,k) is the number of partitions of a set of size n into at most k parts.
T(n,k) is the number of sequences of n top-to-random shuffles of a deck of k cards that leave the deck invariant.
T(n,k) = where pi is the natural permutation character of the symmetric group Sym_k. This gives another combinatorial interpretation of T(n,k) as counting sequences of box moves on Young diagrams. Reference linked to below. (End)
Diagonal entries T(n,n) are the Bell numbers A000110. - Robert Israel, Aug 10 2015
From Manfred Boergens, Mar 18 2025: (Start)
The partitions in the second comment can be described as disjoint collections of subsets of [n] without the empty set with union = [n]. For instance, T(4,2)=8 is the number of partitions of [4] into 1 or 2 parts: 1234, 1 234, 2 134, 3 124, 4 123, 12 34, 13 24, 14 23.
For disjoint collections which may include one empty set see A381682.
For arbitrary collections without the empty set see A369950.
For arbitrary collections which may include one empty set see A381683. (End)

Examples

			Triangle begins:
  1;
  1,  2;
  1,  4,  5;
  1,  8, 14, 15;
  1, 16, 41, 51, 52;
  ...
		

References

  • Richard Stanley, Enumerative Combinatorics, Cambridge Univ. Press, 1997 page 38. (#7 of the twelvefold ways)

Crossrefs

Programs

  • Haskell
    a102661 n k = a102661_tabl !! (n-1) !! (k-1)
    a102661_row n = a102661_tabl !! (n-1)
    a102661_tabl = map (scanl1 (+) . tail) $ tail a048993_tabl
    -- Reinhard Zumkeller, Jun 19 2015
    
  • Maple
    with(combinat): A102661_row := proc(n) local k,j; seq(add(stirling2(n,j),j=1..k),k=1..n) end:
    seq(print(A102661_row(r)),r=1..6); # Peter Luschny, Sep 30 2011
  • Mathematica
    Table[Table[Sum[StirlingS2[n, i], {i, 1, k}], {k, 1, n}], {n, 1,10}] // Grid (* Geoffrey Critzer, Mar 22 2011*)
    Table[Accumulate[StirlingS2[n,Range[n]]],{n,10}]//Flatten (* Harvey P. Dale, Oct 28 2019 *)
  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(sum(i=1, k, stirling(n,i, 2)), ", ");); print(););} \\ Michel Marcus, Aug 10 2015
    
  • Sage
    def T(n,k):
        return sum([stirling_number2(n,j) for j in range(1,k+1)])
    # Danny Rorabaugh, Oct 13 2015

Formula

E.g.f. for row polynomials s(n,y) = Sum_{k=0..n} a(n,k)*y^k is (y*e^(e^(x*y)-1)- e^(y*(e^x-1)))/(y-1) - 1. - Robert Israel, Aug 10 2015

A270662 E.g.f.: Product_{k>=1} (1 + sin(x^k)).

Original entry on oeis.org

1, 1, 2, 11, 48, 341, 2640, 23561, 228816, 2674153, 32749200, 440019469, 6504919080, 102077649805, 1724124159576, 31359633592769, 596774321099040, 12048020039472209, 259300490127149664, 5798531237450331797, 136619813565630980280, 3380131718416134261301
Offset: 0

Views

Author

Vaclav Kotesovec, Mar 21 2016

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 25; Range[0, nmax]! * CoefficientList[Series[Product[1+Sin[x^k], {k, 1, nmax}], {x, 0, nmax}], x]

A291709 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of e.g.f.: exp(Sum_{j>=1} (-1)^(j-1)*binomial(-k,j-1)*x^j/j).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 6, 1, 1, 1, 4, 13, 24, 1, 1, 1, 5, 22, 73, 120, 1, 1, 1, 6, 33, 154, 501, 720, 1, 1, 1, 7, 46, 273, 1306, 4051, 5040, 1, 1, 1, 8, 61, 436, 2721, 12976, 37633, 40320, 1, 1, 1, 9, 78, 649, 4956, 31701, 147484, 394353, 362880, 1
Offset: 0

Views

Author

Seiichi Manyama, Oct 21 2017

Keywords

Examples

			Square array B(j,k) begins:
   1,   1,   1,    1,    1, ...
   0,   1,   2,    3,    4, ...
   0,   1,   3,    6,   10, ...
   0,   1,   4,   10,   20, ...
   0,   1,   5,   15,   35, ...
   0,   1,   6,   21,   56, ...
Square array A(n,k) begins:
   1,   1,   1,    1,    1, ...
   1,   1,   1,    1,    1, ...
   1,   2,   3,    4,    5, ...
   1,   6,  13,   22,   33, ...
   1,  24,  73,  154,  273, ...
   1, 120, 501, 1306, 2721, ...
		

Crossrefs

Rows n=0-1 give A000012.
Main diagonal gives A293989.

Programs

  • Mathematica
    B[j_, k_] := (-1)^(j-1)*Binomial[-k, j-1];
    A[0, ] = 1; A[n, k_] := (n-1)!*Sum[B[j, k]*A[n-j, k]/(n-j)!, {j, 1, n}];
    Table[A[n-k, k], {n, 0, 10}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Nov 03 2017 *)

Formula

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

A006152 Exponential generating function x*exp(x/(1-x)).

Original entry on oeis.org

1, 2, 9, 52, 365, 3006, 28357, 301064, 3549177, 45965530, 648352001, 9888877692, 162112109029, 2841669616982, 53025262866045, 1049180850990736, 21937381717388657, 483239096122434354, 11184035897992673017, 271287473871771163460, 6881656485607798743261
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of labeled rooted trees with every non-root vertex of degree 1 or 2. - Geoffrey Critzer, May 21 2012.
Total number of unit length lists in all sets of lists, cf. A000262. - Alois P. Heinz, May 10 2016

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    nn = 17; a = x/(1 - x);
    Range[0, nn]! CoefficientList[Series[x Exp[a], {x, 0, nn}], x]  (* Geoffrey Critzer, May 21 2012 *)
  • PARI
    a(n)=n!*polcoeff(x*exp(x/(1-x)+O(x^n)), n)

Formula

a(n) = n*A000262(n-1).
D-finite with recurrence a(n) = 2*(n-1)*a(n-1)-(n^2-5*n+5)*a(n-2)-(n-4)*(n-2)*a(n-3). - Vaclav Kotesovec, Oct 05 2012
a(n) ~ n^(n-1/4)*exp^(2*sqrt(n)-n-1/2)/sqrt(2). - Vaclav Kotesovec, Oct 05 2012
a(n) = A320264(n+1,n). - Alois P. Heinz, Oct 08 2018

Extensions

More terms from Michael Somos, Jun 07 2000

A052897 Expansion of e.g.f.: exp(2*x/(1-x)).

Original entry on oeis.org

1, 2, 8, 44, 304, 2512, 24064, 261536, 3173888, 42483968, 621159424, 9841950208, 167879268352, 3065723549696, 59651093528576, 1231571119812608, 26883546193002496, 618463501807058944
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Previous name was: A simple grammar.

Crossrefs

Row sums of A059110.

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Exp(2*x/(1 - x)))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 15 2018
    
  • Magma
    [Factorial(n)*Evaluate(LaguerrePolynomial(n, -1), -2): n in [0..25]]; // G. C. Greubel, Feb 23 2021
    
  • Maple
    L := proc(n,a,x) if n=0 then 1 elif n=1 then a+1-x else (2*n+a-1-x)/n*L(n-1,a,x) - (n+a-1)/n*L(n-2,a,x) fi end: A052897 := n -> n!*L(n,-1,-2): seq(A052897(n),n=0..17); # Peter Luschny, Nov 20 2011
    spec := [S,{B=Set(C),C=Sequence(Z,1 <= card),S=Prod(B,B)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    Range[0, 19]! CoefficientList[ Series[E^(2*x/(1 - x)), {x, 0, 19}], x] (* Zerinvary Lajos, Mar 21 2007 *)
    Table[n!*LaguerreL[n, -1, -2], {n,0,30}] (* G. C. Greubel, Feb 23 2021 *)
  • PARI
    a=Vec(exp(2*x/(1-x)));for(n=2,#a-1,a[n+1]*=n!);a \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    [factorial(n)*gen_laguerre(n, -1, -2) for n in (0..25)] # G. C. Greubel, Feb 23 2021

Formula

E.g.f.: exp(2*x/(1-x)). - Vladeta Jovovic, Jan 04 2001
Recurrence: {a(0)=1, a(1)=2, (n^2+n)*a(n) + (-4-2*n)*a(n+1) + a(n+2)}.
LAH transform of A000079: a(n) = Sum_{k=0..n} 2^k*n!/k!*binomial(n-1, k-1). - Vladeta Jovovic, Oct 17 2003
a(n) = n!*L(n,-1,-2). - Karol A. Penson, Oct 16 2006 [Here L(n,a,x) is the n-th generalized Laguerre polynomial with parameter a, evaluated at x. L(n,a,x) is 1 if n=0, a+1-x if n=1 and otherwise (2*n+a-1-x)/n*L(n-1,a,x)-(n+a-1)/n*L(n-2,a,x). - Peter Luschny, Nov 20 2011]
a(n) ~ 2^(-1/4)*exp(2*sqrt(2*n)-n-1)*n^(n-1/4) * (1 + 7/(48*sqrt(2*n))). - Vaclav Kotesovec, Oct 09 2012, extended Dec 01 2021
E.g.f.: 1 + 2*x/((1-x)*T(0) - x), where T(k) = 4*k+1 + x^2/((4*k+3)*(1-x)^2 + x^2/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 30 2013
E.g.f.: exp(Sum_{k>=1} 2*x^k). - Vaclav Kotesovec, Mar 07 2015
a(n) = Sum_{k=0..n} binomial(n,k)*l(k)*l(n-k), where l(m) = A000262(m). - Emanuele Munarini, Aug 31 2017

Extensions

New name using e.g.f., Vaclav Kotesovec, Feb 25 2014

A293116 Expansion of e.g.f. exp(x/(x-1)).

Original entry on oeis.org

1, -1, -1, -1, 1, 19, 151, 1091, 7841, 56519, 396271, 2442439, 7701409, -145269541, -4833158329, -104056218421, -2002667085119, -37109187217649, -679877731030049, -12440309297451121, -227773259993414719, -4155839606711748061, -74724654677947488521
Offset: 0

Views

Author

Seiichi Manyama, Sep 30 2017

Keywords

Crossrefs

Column k=0 of A293119.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, -add(
          a(n-j)*binomial(n-1, j-1)*j!, j=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 30 2017
  • Mathematica
    CoefficientList[Series[E^(-x/(1-x)), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Sep 30 2017 *)
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace(exp(x/(x-1))))

Formula

E.g.f.: exp(x/(x-1)).
a(n) = (-1)^n * A111884(n).
E.g.f.: Product_{k>=1} (1 - x^k)^(phi(k)/k), where phi() is the Euler totient function (A000010). - Ilya Gutkovskiy, May 25 2019
D-finite with recurrence a(n) +(-2*n+3)*a(n-1) +(n-1)*(n-2)*a(n-2)=0. - R. J. Mathar, Mar 13 2023
Previous Showing 81-90 of 261 results. Next