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

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

A245733 Number T(n,k) of endofunctions on [n] such that at least one preimage with cardinality k exists and, if j is the largest value with a nonempty preimage, the preimage cardinality of i is >=k for all i<=j and equal to k for at least one i<=j; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 14, 12, 0, 1, 181, 68, 6, 0, 1, 2584, 520, 20, 0, 0, 1, 41973, 4542, 120, 20, 0, 0, 1, 776250, 46550, 672, 70, 0, 0, 0, 1, 16231381, 540136, 5516, 112, 70, 0, 0, 0, 1, 380333228, 7045020, 40140, 1848, 252, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 30 2014

Keywords

Comments

T(0,0) = 1 by convention.

Examples

			T(2,0) = 1: (2,2).
T(2,1) = 2: (1,2), (2,1).
T(2,2) = 1: (1,1).
T(3,1) = 12: (1,1,2), (1,2,1), (1,2,2), (1,2,3), (1,3,2), (2,1,1), (2,1,2), (2,1,3), (2,2,1), (2,3,1), (3,1,2), (3,2,1).
T(3,3) = 1: (1,1,1).
Triangle T(n,k) begins:
0 :         1;
1 :         0,      1;
2 :         1,      2,    1;
3 :        14,     12,    0,   1;
4 :       181,     68,    6,   0,  1;
5 :      2584,    520,   20,   0,  0, 1;
6 :     41973,   4542,  120,  20,  0, 0, 1;
7 :    776250,  46550,  672,  70,  0, 0, 0, 1;
8 :  16231381, 540136, 5516, 112, 70, 0, 0, 0, 1;
     ...
		

Crossrefs

Columns k=0-10 give: A133286 (for n>0), A245854, A245855, A245856, A245857, A245858, A245859, A245860, A245861, A245862, A245863.
Row sums give A000312.
T(2n,n) gives A000984(n).
Cf. A245732.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-j, k)*binomial(n, j), j=k..n))
        end:
    g:= (n, k)-> `if`(k=0, n^n, `if`(n=0, 0, b(n, k))):
    T:= (n, k)-> g(n, k) -g(n, k+1):
    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}]]; g[n_, k_] := If[k == 0, n^n, If[n == 0, 0, b[n, k]]]; T[n_, k_] := g[n, k] - g[n, k+1]; T[0, 0] = 1; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 27 2015, after Alois P. Heinz *)

Formula

E.g.f. of column k=0: 1 +1/(1+LambertW(-x)) -1/(2-exp(x)); e.g.f. of column k>0: 1/(1-Sum_{j>=k} x^j/j!) - 1/(1-Sum_{j>=k+1} x^j/j!).
T(n,k) = A245732(n,k) - A245732(n,k+1).

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

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

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 71, 253, 673, 1585, 38149, 277707, 1402831, 5923503, 85577571, 937629969, 7475614341, 48939413477, 587610659505, 7906296686903, 87384175023995, 804959532778571, 9729015122635103, 144711323234918941, 2009073351016603121
Offset: 0

Views

Author

N. J. A. Sloane, Nov 27 2013

Keywords

Crossrefs

Cf. column k=4 of A245732.

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, add(b(n-j)/j!, j=4..n)) end:
    a:= n-> n!*b(n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 29 2014
  • Mathematica
    CoefficientList[Series[1/(2 + x - E^x + x^2/2 + x^3/6),{x,0,20}],x]*Range[0,20]! (* Vaclav Kotesovec, Aug 02 2014 *)

Formula

E.g.f.: 1/(2 + x - exp(x) + x^2/2 + x^3/6). - Vaclav Kotesovec, Aug 02 2014
a(n) ~ n! / ((1+r^3/6) * r^(n+1)), where r = 1.97615974210650519398... is the root of the equation 2 + r - exp(r) + r^2/2 + r^3/6 = 0. - Vaclav Kotesovec, Aug 02 2014
a(0) = 1; a(n) = Sum_{k=4..n} binomial(n,k) * a(n-k). - Ilya Gutkovskiy, Feb 09 2020

Extensions

More terms from Alois P. Heinz, Jul 29 2014

A244174 Number of compositions of 3n in which the minimal multiplicity of parts equals n.

Original entry on oeis.org

1, 3, 7, 21, 71, 253, 925, 3433, 12871, 48621, 184757, 705433, 2704157, 10400601, 40116601, 155117521, 601080391, 2333606221, 9075135301, 35345263801, 137846528821, 538257874441, 2104098963721, 8233430727601, 32247603683101, 126410606437753, 495918532948105
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2014

Keywords

Examples

			a(2) = 7: [1,1,2,2], [1,2,1,2], [1,2,2,1], [2,1,1,2], [2,1,2,1], [2,2,1,1], [3,3].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<3, 2^(n+1)-1, ((15*n^2-31*n+12) *a(n-1)
           -2*(3*n-2)*(2*n-3) *a(n-2)) / ((3*n-5)*n))
        end:
    seq(a(n), n=0..30);
  • Mathematica
    a[n_] := a[n] = If[n < 3, 2^(n+1) - 1, ((15*n^2 - 31*n + 12)*a[n-1] - 2*(3*n - 2)*(2*n - 3)*a[n-2])/((3*n - 5)*n)]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 07 2014, after Alois P. Heinz *)
  • Sage
    A244174 = lambda m: SetPartitions(2*m,[2*m]).cardinality()+2*SetPartitions(2*m,[m,m]).cardinality()
    [1] + [A244174(m) for m in (1..26)] # Peter Luschny, Aug 02 2015

Formula

a(n) = A242451(3n,n).
Recurrence: see Maple program.
For n>0, a(n) = 1 + C(2n,n) = 1 + A000984(n). - Vaclav Kotesovec, Jun 21 2014
G.f.: 1/(sqrt(1-4*x)) + x/(1-x). - Alois P. Heinz, Jun 22 2014
a(n) = A245732(2n,n). - Alois P. Heinz, Jul 30 2014
a(n) = A065567(2n,n) for n>=1. - Alois P. Heinz, Sep 05 2023

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

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 253, 925, 2509, 6007, 13443, 785643, 6114551, 31980469, 138704361, 539262713, 13685913105, 170996304653, 1442111683785, 9802624250281, 58233700998845, 939069565583991, 15109164547164171, 181402703206632211, 1758154702415920051
Offset: 0

Views

Author

Alois P. Heinz, Aug 01 2014

Keywords

Crossrefs

Cf. column k=5 of A245732.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
           add(a(n-j)*binomial(n, j), j=5..n))
        end:
    seq(a(n), n=0..30);
  • Mathematica
    CoefficientList[Series[1/(2 + x - E^x + x^2/2! + x^3/3! + x^4/4!),{x,0,30}],x]*Range[0,30]! (* Vaclav Kotesovec, Aug 02 2014 *)

Formula

E.g.f.: 1/(2 + x - exp(x) + x^2/2! + x^3/3! + x^4/4!). - Vaclav Kotesovec, Aug 02 2014
a(n) ~ n! / ((1+r^4/4!) * r^(n+1)), where r = 2.376178375424367122... is the root of the equation 2 + r - exp(r) + r^2/2! + r^3/3! + r^4/4! = 0. - Vaclav Kotesovec, Aug 02 2014

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

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 925, 3433, 9439, 22881, 51767, 112269, 17390049, 140166497, 749266977, 3311021321, 13091222301, 48138992687, 2477067794573, 33549609515571, 292811657874791, 2040445353211231, 12382874543793451, 68436110449556971
Offset: 0

Views

Author

Alois P. Heinz, Aug 01 2014

Keywords

Crossrefs

Cf. column k=6 of A245732.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
           add(a(n-j)*binomial(n, j), j=6..n))
        end:
    seq(a(n), n=0..35);
  • Mathematica
    CoefficientList[Series[1/(2 + x - E^x + x^2/2! + x^3/3! + x^4/4! + x^5/5!),{x,0,30}],x]*Range[0,30]! (* Vaclav Kotesovec, Aug 02 2014 *)

Formula

E.g.f.: 1/(2 + x - exp(x) + x^2/2! + x^3/3! + x^4/4! + x^5/5!). - Vaclav Kotesovec, Aug 02 2014
a(n) ~ n! / ((1+r^5/5!) * r^(n+1)), where r = 2.77092853312194416389... is the root of the equation 2 + r - exp(r) + r^2/2! + r^3/3! + r^4/4! + r^5/5! = 0. - Vaclav Kotesovec, Aug 02 2014

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

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 3433, 12871, 35751, 87517, 199785, 436697, 927657, 401005793, 3296326113, 17887397621, 80157730101, 321127444171, 1195366208091, 4226755326331, 486914893507831, 6899197122043711, 61532746814157691, 436349292456987871
Offset: 0

Views

Author

Alois P. Heinz, Aug 01 2014

Keywords

Crossrefs

Cf. column k=7 of A245732.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
           add(a(n-j)*binomial(n, j), j=7..n))
        end:
    seq(a(n), n=0..35);
  • Mathematica
    CoefficientList[Series[1/(2 + x - E^x + x^2/2! + x^3/3! + x^4/4! + x^5/5! + x^6/6!),{x,0,40}],x]*Range[0,40]! (* Vaclav Kotesovec, Aug 02 2014 *)

Formula

E.g.f.: 1/(2 + x - exp(x) + x^2/2! + x^3/3! + x^4/4! + x^5/5! + x^6/6!). - Vaclav Kotesovec, Aug 02 2014
a(n) ~ n! / ((1+r^6/6!) * r^(n+1)), where r = 3.161936258680679649... is the root of the equation 2 + r - exp(r) + r^2/2! + r^3/3! + r^4/4! + r^5/5! + r^6/6! = 0. - Vaclav Kotesovec, Aug 02 2014

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

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 12871, 48621, 136137, 335921, 772617, 1700273, 3633105, 7607297, 9481216677, 78911366771, 433024685291, 1961914734031, 7943932891111, 29871106149031, 106624217245891, 366332387265871, 100783979161693411
Offset: 0

Views

Author

Alois P. Heinz, Aug 01 2014

Keywords

Crossrefs

Cf. column k=8 of A245732.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
           add(a(n-j)*binomial(n, j), j=8..n))
        end:
    seq(a(n), n=0..35);
  • Mathematica
    CoefficientList[Series[1/(2 + x - E^x + x^2/2! + x^3/3! + x^4/4! + x^5/5! + x^6/6! + x^7/7!),{x,0,40}],x]*Range[0,40]! (* Vaclav Kotesovec, Aug 02 2014 *)

Formula

E.g.f.: 1/(2 + x - exp(x) + x^2/2! + x^3/3! + x^4/4! + x^5/5! + x^6/6! + x^7/7!). - Vaclav Kotesovec, Aug 02 2014
a(n) ~ n! / ((1+r^7/7!) * r^(n+1)), where r = 3.550140591759854453327299... is the root of the equation 2 + r - exp(r) + r^2/2! + r^3/3! + r^4/4! + r^5/5! + r^6/6! + r^7/7! = 0. - Vaclav Kotesovec, Aug 02 2014

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

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48621, 184757, 520677, 1293293, 2993565, 6626669, 14233965, 29938871, 62040891, 228000637831, 1914395677411, 10597881432571, 48446119334191, 197900630004571, 750527665784311, 2700730064112181
Offset: 0

Views

Author

Alois P. Heinz, Aug 01 2014

Keywords

Crossrefs

Cf. column k=9 of A245732.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
           add(a(n-j)*binomial(n, j), j=9..n))
        end:
    seq(a(n), n=0..40);
  • Mathematica
    CoefficientList[Series[1/(2 + x - E^x + x^2/2! + x^3/3! + x^4/4! + x^5/5! + x^6/6! + x^7/7! + x^8/8!),{x,0,40}],x]*Range[0,40]! (* Vaclav Kotesovec, Aug 02 2014 *)

Formula

E.g.f.: 1/(2 + x - exp(x) + x^2/2! + x^3/3! + x^4/4! + x^5/5! + x^6/6! + x^7/7! + x^8/8!). - Vaclav Kotesovec, Aug 02 2014
a(n) ~ n! / ((1+r^8/8!) * r^(n+1)), where r = 3.93616250913523371282009... is the root of the equation 2 + r - exp(r) + r^2/2! + r^3/3! + r^4/4! + r^5/5! + r^6/6! + r^7/7! + r^8/8! = 0. - Vaclav Kotesovec, Aug 02 2014
Showing 1-10 of 21 results. Next