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

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

A337058 E.g.f.: 1 / (2 + x^2/2 - exp(x)).

Original entry on oeis.org

1, 1, 2, 7, 33, 191, 1323, 10711, 99151, 1032385, 11943003, 151979213, 2109829857, 31730171539, 513903517585, 8917723105003, 165065061436755, 3246274767649637, 67598797715175999, 1485845872704318265, 34378343609138619685, 835190283258080561671
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 13 2020

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 21; CoefficientList[Series[1/(2 + x^2/2 - Exp[x]), {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = n a[n - 1] + Sum[Binomial[n, k] a[n - k], {k, 3, n}]; Table[a[n], {n, 0, 21}]

Formula

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

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

Original entry on oeis.org

1, 0, 0, 2, 6, 24, 200, 1560, 12936, 130368, 1458432, 17623440, 233922480, 3376625472, 52382131776, 870882440064, 15459372915840, 291596692838400, 5824039155720192, 122814724467223296, 2726547887891407104, 63562453551393223680, 1552499303360183700480
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 26 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 22; CoefficientList[Series[1/(1 + x + x^2/2 + 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, 3, n}]; Table[a[n], {n, 0, 22}]
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(1/(1 + x + x^2/2 + log(1 - x)))) \\ Michel Marcus, Jun 27 2022

Formula

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

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

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 20, 1, 0, 1680, 240, 1, 369600, 102960, 4160, 168168001, 76876800, 7743840, 137225153280, 93117024001, 17091609600, 182510023324320, 172080261401600, 49615854288001, 369403226582016000, 461748751736204400, 191552892427653120
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-(sinh(x)-sin(x))/2)))

Formula

a(0) = 1; a(n) = Sum_{k=0..floor((n-3)/4)} binomial(n,4*k+3) * a(n-4*k-3).
E.g.f.: 1 / ( 1 - (sinh(x) - sin(x))/2 ).

A341283 Number of ways to partition n labeled elements into sets of different sizes of at least 3.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 36, 57, 211, 331, 958, 29228, 64065, 294659, 1232479, 3549717, 11296603, 557617987, 1512758550, 8514685860, 41183585167, 251022906729, 838303110637, 4183056225010, 263978773601641, 887708421995331, 5813843897797861, 32212405278588967, 216518890998518716
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, 3):
    seq(a(n), n=0..30);  # Alois P. Heinz, Apr 28 2021
  • Mathematica
    nmax = 29; CoefficientList[Series[Product[(1 + x^k/k!), {k, 3, nmax}], {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = -(n - 1)! Sum[DivisorSum[k, # (-#!)^(-k/#) &, # > 2 &] a[n - k]/(n - k)!, {k, 1, n}]; Table[a[n], {n, 0, 29}]

Formula

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

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

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 20, 0, 1, 1680, 0, 330, 369600, 1, 180180, 168168000, 13990, 163363200, 137225088001, 39041010, 232792560000, 182509367449640, 118574979600, 494730748512001, 369398970833730090, 451334037000000, 1500683270499930350, 1080492079984609149000
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+3)/(5*k+3)!))))

Formula

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

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

Original entry on oeis.org

1, 0, 6, 20, 120, 672, 5516, 40140, 368640, 3521870, 37445298, 422339502, 5215454426, 68144100780, 954428684280, 14160968076584, 222769496190060, 3692874342747114, 64493471050666430, 1181830474135532130, 22692074431844298558, 455404848204906308984
Offset: 2

Views

Author

Alois P. Heinz, Aug 04 2014

Keywords

Crossrefs

Column k=2 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, 2) -b(n, 3):
    seq(a(n), n=2..25);

Formula

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

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).
Showing 1-10 of 10 results.