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 10 results.

A032032 Number of ways to partition n labeled elements into sets of sizes of at least 2 and order the sets.

Original entry on oeis.org

1, 0, 1, 1, 7, 21, 141, 743, 5699, 42241, 382153, 3586155, 38075247, 428102117, 5257446533, 68571316063, 959218642651, 14208251423433, 223310418094785, 3699854395380371, 64579372322979335, 1182959813115161773, 22708472725269799933, 455643187943171348103
Offset: 0

Views

Author

Keywords

Comments

From Dennis P. Walsh, Apr 15 2013: (Start)
With m = floor(n/2), a(n) is the number of ways to distribute n different toys to m numbered children such that each child receiving a toy gets at least two toys and, if child k gets no toys, then each child numbered higher than k also gets no toys.
a(n) = sum of n-th row of triangle A200091 for n >= 2. (End)

Examples

			For n=5, a(5)=21 since there are 21 toy distributions satisfying the conditions above. Denoting a distribution by |kid_1 toys|kid_2 toys|, we have the distributions
  |t1,t2,t3,t4,t5|_|, |t1,t2,t3|t4,t5|, |t1,t2,t4|t3,t5|, |t1,t2,t5|t3,t4|, |t1,t3,t4|t2,t5|, |t1,t3,t5|t2,t4|, |t1,t4,t5|t2,t3|, |t2,t3,t4|t1,t5|, |t2,t3,t5|t1,t4|, |t2,t4,t5|t1,t3|, |t3,t4,t5|t1,t2|, |t1,t2|t3,t4,t5|, |t1,t3|t2,t4,t5|, |t1,t4|t2,t3,t5|, |t1,t5|t2,t3,t4|, |t2,t3|t1,t4,t5|, |t2,t4|t1,t3,t5|, |t2,t5|t1,t3,t4|, |t3,t4|t1,t2,t5|, |t3,t5|t1,t2,t4|, and |t4,t5|,t1,t2,t3|. - _Dennis P. Walsh_, Apr 15 2013
		

Crossrefs

Cf. column k=2 of A245732.
Cf. A200091.

Programs

  • Maple
    spec := [ B, {B=Sequence(Set(Z,card>1))}, labeled ]; [seq(combstruct[count](spec, size=n), n=0..30)];
    # second Maple program:
    b:= proc(n) b(n):= `if`(n=0, 1, add(b(n-j)/j!, j=2..n)) end:
    a:= n-> n!*b(n):
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 29 2014
  • Mathematica
    a[n_] := n! * Sum[ Binomial[k, j] * StirlingS2[n-k+j, j]*j! / (n-k+j)! * (-1)^(k-j), {k, 1, n}, {j, 0, k}]; a[0] = 1; Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Sep 05 2012, from given formula *)
  • PARI
    x='x+O('x^66); Vec(serlaplace( 1/(2+x-exp(x)) ) ) \\ Joerg Arndt, Apr 16 2013

Formula

"AIJ" (ordered, indistinct, labeled) transform of 0, 1, 1, 1...
E.g.f.: 1/(2+x-exp(x)).
a(n) = n! * Sum_{k=1..n} Sum_{j=0..k} C(k,j) * Stirling2(n-k+j,j) * (j!/(n-k+j)!) *(-1)^(k-j); a(0)=1. - Vladimir Kruchinin, Feb 01 2011
a(n) ~ n! / ((r-1)*(r-2)^(n+1)), where r = -LambertW(-1,-exp(-2)) = 3.14619322062... - Vaclav Kotesovec, Oct 08 2013
a(0) = 1; a(n) = Sum_{k=2..n} binomial(n,k) * a(n-k). - Ilya Gutkovskiy, Feb 09 2020
a(n) = Sum_{s in S_n^0} Product_{i=1..n} binomial(i,s(i)-1), where s ranges over the set S_n^0 of derangements of [n], i.e., the permutations of [n] without fixed points. - Jose A. Rodriguez, Feb 02 2021

A245732 Number T(n,k) of endofunctions on [n] such that at least one preimage with cardinality >=k exists and a nonempty preimage of j implies that all i<=j have preimages with cardinality >=k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 27, 13, 1, 1, 256, 75, 7, 1, 1, 3125, 541, 21, 1, 1, 1, 46656, 4683, 141, 21, 1, 1, 1, 823543, 47293, 743, 71, 1, 1, 1, 1, 16777216, 545835, 5699, 183, 71, 1, 1, 1, 1, 387420489, 7087261, 42241, 2101, 253, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 30 2014

Keywords

Comments

T(0,0) = 1 by convention.
In general, column k > 1 is asymptotic to n! / ((1+r^(k-1)/(k-1)!) * r^(n+1)), where r is the root of the equation 2 - exp(r) + Sum_{j=1..k-1} r^j/j! = 0. - Vaclav Kotesovec, Aug 02 2014

Examples

			Triangle T(n,k) begins:
0 :         1;
1 :         1,      1;
2 :         4,      3,    1;
3 :        27,     13,    1,   1;
4 :       256,     75,    7,   1,  1;
5 :      3125,    541,   21,   1,  1, 1;
6 :     46656,   4683,  141,  21,  1, 1, 1;
7 :    823543,  47293,  743,  71,  1, 1, 1, 1;
8 :  16777216, 545835, 5699, 183, 71, 1, 1, 1, 1;
		

Crossrefs

Column k=0 gives A000312.
Columns k=1-10 give (for n>0): A000670, A032032, A102233, A232475, A245790, A245791, A245792, A245793, A245794, A245795.
T(2n,n) gives A244174(n) or 1+A007318(2n,n) = 1+A000984(n) for n>0.
Cf. A245733.

Programs

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

Formula

E.g.f. (for column k > 0): 1/(2 -exp(x) +Sum_{j=1..k-1} x^j/j!) -1. - Vaclav Kotesovec, Aug 02 2014

A102233 Number of preferential arrangements of n labeled elements when at least k=3 elements per rank are required.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 21, 71, 183, 2101, 13513, 64285, 629949, 5762615, 41992107, 427215283, 4789958371, 47283346849, 540921904725, 6980052633257, 85901272312905, 1129338979629643, 16398293425501375, 238339738265039119, 3588600147767147775, 58124879519314730741
Offset: 0

Views

Author

Thomas Wieder, Jan 01 2005

Keywords

Comments

The labeled case for at least k=2 elements per rank is given by A032032 = Partition n labeled elements into sets of sizes of at least 2 and order the sets. The unlabeled case for at least k=3 elements per rank is given by A000930 = A Lamé sequence of higher order. The unlabeled case for at least k=2 elements per rank is given by A000045 = Fibonacci numbers.
With m = floor(n/3), a(n) is the number of ways to distribute n different toys to m numbered children such that each child receiving a toy gets at least three toys and, if child k gets no toys, then each child numbered higher than k also gets no toys. Furthermore, a(n)= row sums of triangle A200092 for n>=3. - Dennis P. Walsh, Apr 15 2013
Row sums of triangle A200092. - Dennis P. Walsh, Apr 15 2013

Examples

			Let 1,2,3,4,5,6 denote six labeled elements. Let | denote a separation between two ranks. E.g., if elements 1,2 and 3 are on rank (also called level) one and elements 3,4 and 5 are on rank two, then we have the ranking 123|456.
For n=9 we have a(9)=2101 rankings. The order within a rank does not count. Six examples are: 123|456|789; 123456789; 12345|6789; 129|345678; 1235|46789; 789|123456.
		

Crossrefs

Cf. column k=3 of A245732.

Programs

  • Maple
    seq (n! *coeff (series (1- (z^2-2*exp(z)+2+2*z) /(4-2*exp(z)+2*z+z^2), z=0, n+1), z, n), n=0..30);
    with(combstruct): SeqSetL := [S, {S=Sequence(U), U=Set(Z, card >= 3)}, labeled]: seq(count(SeqSetL, size=j), j=0..23); # Zerinvary Lajos, Oct 19 2006
    # third Maple program:
    b:= proc(n) b(n):= `if`(n=0, 1, add(b(n-j)/j!, j=3..n)) end:
    a:= n-> n!*b(n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 29 2014
  • Mathematica
    CoefficientList[Series[1-(x^2-2*E^x+2+2*x)/(4-2*E^x+2*x+x^2), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Sep 29 2013 *)
    b[n_] := b[n] = If[n==0, 1, Sum[b[n-j]/j!, {j, 3, n}]]; a[n_] := n!*b[n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 31 2016, after Alois P. Heinz *)
  • PARI
    z='z+O('z^66); Vec(serlaplace( 1-(z^2-2*exp(z)+2+2*z) / (4-2*exp(z)+2*z+z^2) ) ) \\ Joerg Arndt, Apr 16 2013

Formula

E.g.f.: 1-(z^2-2*exp(z)+2+2*z)/(4-2*exp(z)+2*z+z^2).
a(n) = n! * sum(m=1..n, sum(k=0..m, k!*(-1)^(m-k) *binomial(m,k) *sum(i=0..n-m, stirling2(i+k,k) *binomial(m-k,n-m-i) *2^(-n+m+i) /(i+k)!))); a(0)=1. - Vladimir Kruchinin, Feb 01 2011
a(n) ~ 2*n!/((2+r^2)*r^(n+1)), where r = 1.56811999239... is the root of the equation 4+2*r+r^2 = 2*exp(r). - Vaclav Kotesovec, Sep 29 2013
a(0) = 1; a(n) = Sum_{k=3..n} binomial(n,k) * a(n-k). - Ilya Gutkovskiy, Feb 09 2020
E.g.f.: 1/(2 + x + x^2/2 - exp(x)). - Christian Sievers, Oct 27 2024

Extensions

a(0) changed to 1 at the suggestion of Zerinvary Lajos, Oct 26 2006

A337059 E.g.f.: 1 / (2 + x^3/6 - exp(x)).

Original entry on oeis.org

1, 1, 3, 12, 67, 461, 3823, 36933, 407963, 5068909, 69982083, 1062784273, 17607354955, 316012688213, 6108011298847, 126490611884013, 2794122884322635, 65578524701197341, 1629676370022564219, 42748628870263418761, 1180373377691425730235
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 13 2020

Keywords

Crossrefs

Programs

  • Maple
    S:= series(1/(2+x^3/6-exp(x)),x,31):
    seq(coeff(S,x,i)*i!,i=0..30); # Robert Israel, Aug 28 2020
  • Mathematica
    nmax = 20; CoefficientList[Series[1/(2 + x^3/6 - Exp[x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = a[1] = 1; a[n_] := a[n] = n (a[n - 1] + (n - 1) a[n - 2]/2) + Sum[Binomial[n, k] a[n - k], {k, 4, n}]; Table[a[n], {n, 0, 20}]

Formula

a(0) = a(1) = 1; a(n) = n * (a(n-1) + (n-1) * a(n-2) / 2) + Sum_{k=4..n} binomial(n,k) * a(n-k).

A343319 Number of ways to partition n labeled elements into sets of different sizes of at least 4.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 1, 127, 211, 793, 1288, 3719, 6007, 646439, 1467077, 7211843, 30123763, 91160937, 293184840, 1118980377, 110635063749, 319072758997, 1918239941962, 9518126978941, 58119248603131, 202992067559011, 1031021295578251, 4151156602678042, 650225250329137612
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 28 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
         `if`(i>n, 0, b(n, i+1)+b(n-i, i+1)*binomial(n, i)))
        end:
    a:= n-> b(n, 4):
    seq(a(n), n=0..30);  # Alois P. Heinz, Apr 28 2021
  • Mathematica
    nmax = 30; CoefficientList[Series[Product[(1 + x^k/k!), {k, 4, nmax}], {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = -(n - 1)! Sum[DivisorSum[k, # (-#!)^(-k/#) &, # > 3 &] a[n - k]/(n - k)!, {k, 1, n}]; Table[a[n], {n, 0, 30}]

Formula

E.g.f.: Product_{k>=4} (1 + x^k/k!).

A245856 Number of preferential arrangements of n labeled elements such that the minimal number of elements per rank equals 3.

Original entry on oeis.org

1, 0, 0, 20, 70, 112, 1848, 12840, 62700, 591800, 5484908, 40589276, 421291780, 4704380800, 46345716880, 533446290384, 6931113219780, 85313661653400, 1121432682942740, 16310909250477380, 237534778732260548, 3578871132644512672, 57980168196079811800
Offset: 3

Views

Author

Alois P. Heinz, Aug 04 2014

Keywords

Crossrefs

Column k=3 of A245733.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-j, k)*binomial(n, j), j=k..n))
        end:
    a:= n-> b(n, 3) -b(n, 4):
    seq(a(n), n=3..30);
  • Mathematica
    With[{nn=30},CoefficientList[Series[1/(2-Exp[x]+x+x^2/2)-1/(2-Exp[x]+ x+ x^2/2+ x^3/6),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Feb 14 2016 *)

Formula

E.g.f.: 1/(2-exp(x)+x+x^2/2)-1/(2-exp(x)+x+x^2/2+x^3/6).
a(n) = A102233(n) - A232475(n) = A245732(n,3) - A245732(n,4).

A245857 Number of preferential arrangements of n labeled elements such that the minimal number of elements per rank equals 4.

Original entry on oeis.org

1, 0, 0, 0, 70, 252, 420, 660, 35640, 271700, 1389388, 5137860, 79463020, 905649500, 7336909980, 48400150764, 573924746400, 7735300382250, 85942063340210, 795156908528290, 9670781421636258, 143772253669334950, 1993964186469438950, 24015169625528033550
Offset: 4

Views

Author

Alois P. Heinz, Aug 04 2014

Keywords

Crossrefs

Column k=4 of A245733.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-j, k)*binomial(n, j), j=k..n))
        end:
    a:= n-> b(n, 4) -b(n, 5):
    seq(a(n), n=4..30);

Formula

E.g.f.: 1/(1-Sum_{j>=4} x^j/j!) - 1/(1-Sum_{j>=5} x^j/j!).
a(n) = A232475(n) - A245790(n) = A245732(n,4) - A245732(n,5).

A365914 Expansion of e.g.f. 1 / ( 1 - Sum_{k>=0} x^(5*k+4) / (5*k+4)! ).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 70, 1, 0, 0, 34650, 1430, 1, 0, 63063000, 5105100, 54740, 1, 305540235000, 40738698000, 1134117600, 1652090, 3246670537110001, 644180662125000, 33240837630000, 314389754250, 66475579247381221350, 18359921887357050001
Offset: 0

Views

Author

Seiichi Manyama, Sep 22 2023

Keywords

Crossrefs

Programs

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

Formula

a(0) = 1; a(n) = Sum_{k=0..floor((n-4)/5)} binomial(n,5*k+4) * a(n-5*k-4).

A355285 Expansion of e.g.f. 1 / (1 + x + x^2/2 + x^3/3 + log(1 - x)).

Original entry on oeis.org

1, 0, 0, 0, 6, 24, 120, 720, 7560, 76608, 810432, 9141120, 118015920, 1666336320, 25211774016, 404932155264, 6951992261760, 127203705538560, 2467434718218240, 50477473338494976, 1086707769452699904, 24573149993692615680, 582367494447600583680, 14430857455114783119360
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 26 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 23; CoefficientList[Series[1/(1 + x + x^2/2 + x^3/3 + Log[1 - x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n, k] (k - 1)! a[n - k], {k, 4, n}]; Table[a[n], {n, 0, 23}]
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(1/(1 + x + x^2/2 + x^3/3 + log(1 - x)))) \\ Michel Marcus, Jun 27 2022

Formula

E.g.f.: 1 / (1 - Sum_{k>=4} x^k/k).
a(0) = 1; a(n) = Sum_{k=4..n} binomial(n,k) * (k-1)! * a(n-k).

A365913 Expansion of e.g.f. 1 / ( 1 - Sum_{k>=0} x^(3*k+4) / (3*k+4)! ).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 1, 70, 0, 1, 660, 34650, 1, 5434, 1351350, 63063001, 43656, 40694940, 6983776801, 305540584486, 1140183540, 550554404401, 77301682251156, 3246701716667574, 38582808660001, 13159690691494570, 1627974214800566490, 66478153367438069401
Offset: 0

Views

Author

Seiichi Manyama, Sep 22 2023

Keywords

Crossrefs

Programs

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

Formula

a(0) = 1; a(n) = Sum_{k=0..floor((n-4)/3)} binomial(n,3*k+4) * a(n-3*k-4).
Showing 1-10 of 10 results.