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.

A331826 Coefficients in asymptotic expansion of sequence A101880.

Original entry on oeis.org

1, 1, 2, 5, 16, 60, 253, 1180, 6023, 33306, 197719, 1250906, 8387942, 59357195, 441685485, 3444965562, 28082207264, 238628007349, 2108871422308, 19343221199365, 183810517195168, 1806639257820732, 18339886099839327, 192028550724708334, 2071309027341071260
Offset: 0

Views

Author

Vaclav Kotesovec, Jan 28 2020

Keywords

Examples

			A101880(n) / n! ~ 1 + 1/n + 2/n^2 + 5/n^3 + 16/n^4 + 60/n^5 + 253/n^6 + ...
A331517(n) / (exp(-1) * n!) ~ 1 + 1/n + 2/n^2 + 5/n^3 + 16/n^4 + 60/n^5 + 253/n^6 + ...
		

Crossrefs

A274174 Number of compositions of n if all summand runs are kept together.

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 22, 36, 60, 97, 162, 254, 406, 628, 974, 1514, 2305, 3492, 5254, 7842, 11598, 17292, 25294, 37090, 53866, 78113, 112224, 161092, 230788, 328352, 466040, 658846, 928132, 1302290, 1821770, 2537156, 3536445, 4897310, 6777806, 9341456, 12858960, 17625970, 24133832, 32910898, 44813228, 60922160, 82569722
Offset: 0

Views

Author

Gregory L. Simay, Jun 12 2016

Keywords

Comments

a(n^2) is odd. - Gregory L. Simay, Jun 23 2019
Also the number of compositions of n avoiding the patterns (1,2,1) and (2,1,2). - Gus Wiseman, Jul 07 2020

Examples

			If the summand runs are blocked together, there are 22 compositions of a(6): 6; 5+1, 1+5, 4+2, 2+4, (3+3), 4+(1+1), (1+1)+4, 1+2+3, 1+3+2, 2+1+3, 2+3+1, 3+1+2, 3+2+1, (2+2+2), 3+(1+1+1), (1+1+1)+3, (2+2)+(1+1), (1+1)+(2+2), 2+(1+1+1+1), (1+1+1+1)+2, (1+1+1+1+1+1).
a(0)=1; a(1)= 1; a(4) = 7; a(9) = 97; a(16) = 2305; a(25) = 78113 and a(36) = 3536445. - _Gregory L. Simay_, Jun 23 2019
		

Crossrefs

The version for patterns is A001339.
The version for prime indices is A333175.
The complement (i.e., the matching version) is A335548.
Anti-run compositions are A003242.
(1,2,1)- and (2,1,2)-matching permutations of prime indices are A335462.
(1,2,1)-matching compositions are A335470.
(1,2,1)-avoiding compositions are A335471.
(2,1,2)-matching compositions are A335472.
(2,1,2)-avoiding compositions are A335473.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
           add(b(n-i*j, i-1, p+`if`(j=0, 0, 1)), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 12 2016
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==Length[Union[#]]&]],{n,0,10}] (* Gus Wiseman, Jul 07 2020 *)
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0,
        Sum[b[n - i*j, i - 1, p + If[j == 0, 0, 1]], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 11 2021, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>=0} k! * A116608(n,k). - Joerg Arndt, Jun 12 2016

Extensions

Terms a(9) and beyond from Joerg Arndt, Jun 12 2016

A178803 Write the factorial of each term in A036043(n).

Original entry on oeis.org

1, 1, 2, 1, 2, 6, 1, 2, 2, 6, 24, 1, 2, 2, 6, 6, 24, 120, 1, 2, 2, 2, 6, 6, 6, 24, 24, 120, 720, 1, 2, 2, 2, 6, 6, 6, 6, 24, 24, 24, 120, 120, 720, 5040, 1, 2, 2, 2, 2, 6, 6, 6, 6, 6, 24, 24, 24, 24, 24, 120, 120, 120, 720, 720, 5040, 40320, 1, 2, 2, 2, 2, 6, 6, 6, 6, 6, 6, 6, 24, 24, 24, 24, 24
Offset: 1

Views

Author

Alford Arnold, Jun 17 2010

Keywords

Comments

Sequence A036043 measures the length of numeric partitions.

Examples

			A036043 begins 1 1 2 1 2 3 1 2 2 3 4 1 2 2 3 3 4 5 ...
so this table begins 1 1 2 1 2 6 1 2 2 6 24 ...
1;
1, 2;
1, 2, 6;
1, 2, 2, 6, 24;
1, 2, 2, 6, 6, 24, 120;
1, 2, 2, 2, 6, 6, 6, 24, 24, 120, 720;
1, 2, 2, 2, 6, 6, 6, 6, 24, 24, 24, 120, 120, 720, 5040;
1, 2, 2, 2, 2, 6, 6, 6, 6, 6, 24, 24, 24, 24, 24, 120, 120, 120, 720, 720, 5040, 40320;
		

Crossrefs

Cf. A000041 (shape sequence), A000142 (factorials), A036043, A101880 (row sums).

Programs

  • SageMath
    def A178803_row(n):
        return [factorial(len(p)) for k in (0..n) for p in Partitions(n, length=k)]
    for n in (0..10): print(A178803_row(n)) # Peter Luschny, Nov 02 2019

A260845 a(n) = Sum_{k=0..n} (-1)^k*P(n,k)*k!, where P(n,k) is the number of partitions of n into k parts.

Original entry on oeis.org

1, -1, 1, -5, 21, -105, 635, -4507, 36457, -330971, 3334377, -36913947, 445426739, -5818545721, 81805507069, -1231690773053, 19772941871385, -337146625794753, 6085005877228943, -115897323408009187, 2323090928155541677, -48883768421712917555, 1077440388662366900397
Offset: 0

Views

Author

Peter Luschny, Aug 01 2015

Keywords

Crossrefs

Row sums of A318144.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>1,
          b(n, i-1), 0)+expand(b(n-i, min(n-i, i))*x))
        end:
    a:= n-> (p-> add(i!*coeff(p, x, i)*(-1)^i, i=0..n))(b(n$2)):
    seq(a(n), n=0..27);  # Alois P. Heinz, Sep 18 2019
  • Mathematica
    CoefficientList[ Series[ Sum[ n!(-x)^n / Product[1 - x^k, {k, n}], {n, 0, 22}], {x, 0, 22}], x]
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    [sum([(-1)^k*number_of_partitions_length(n,k)*factorial(k) for k in (0..n)]) for n in (0..22)]

Formula

G.f.: Sum(n!*(-x)^n/Product(1-x^k, k=1..n), n=1..infinity).

A260883 Number of m-shape ordered set partitions, square array read by ascending antidiagonals, A(m, n) for m, n >= 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 3, 9, 1, 1, 7, 13, 35, 1, 1, 21, 121, 75, 161, 1, 1, 71, 1849, 3907, 541, 913, 1, 1, 253, 35641, 426405, 202741, 4683, 6103, 1, 1, 925, 762763, 65782211, 203374081, 15430207, 47293, 47319, 1, 1, 3433, 17190265, 11872636325, 323213457781, 173959321557
Offset: 1

Views

Author

Peter Luschny, Aug 02 2015

Keywords

Comments

A set partition of m-shape is a partition of a set with cardinality m*n for some n >= 0 such that the sizes of the blocks are m times the parts of the integer partitions of n. It is ordered if the positions of the blocks are taken into account.
If m = 0, all possible sizes are zero. Thus the number of ordered set partitions of 0-shape is the number of ordered partitions of n (partition numbers A101880).
If m = 1, the set is {1, 2, ..., n} and the set of all possible sizes are the integer partitions of n. Thus the number of ordered set partitions of 1-shape is a Fubini number (sequence A000670).
If m = 2, the set is {1, 2, ..., 2n} and the number of ordered set partitions of 2-shape is also the number of 2-packed words of degree n (sequence A094088).

Examples

			[ n ] [0  1   2      3         4            5                  6]
[ m ] -----------------------------------------------------------
[ 0 ] [1, 1,  3,     9,       35,          161,              913]  A101880
[ 1 ] [1, 1,  3,    13,       75,          541,             4683]  A000670
[ 2 ] [1, 1,  7,   121,     3907,       202741,         15430207]  A094088
[ 3 ] [1, 1, 21,  1849,   426405,    203374081,     173959321557]  A243664
[ 4 ] [1, 1, 71, 35641, 65782211, 323213457781, 3482943541940351]  A243665
        A244174
For example the number of ordered set partitions of {1,2,...,9} with sizes in [9], [6,3] and [3,3,3] is 1, 168 and 1680 respectively. Thus A(3,3) = 1849.
Formatted as a triangle:
[1]
[1, 1]
[1, 1, 3]
[1, 1, 3, 9]
[1, 1, 7, 13, 35]
[1, 1, 21, 121, 75, 161]
[1, 1, 71, 1849, 3907, 541, 913]
[1, 1, 253, 35641, 426405, 202741, 4683, 6103]
		

Crossrefs

Programs

  • Sage
    def A260883(m, n):
        shapes = ([x*m for x in p] for p in Partitions(n))
        return sum(factorial(len(s))*SetPartitions(sum(s), s).cardinality() for s in shapes)
    for m in (0..4): print([A260883(m, n) for n in (0..6)])

Formula

From Petros Hadjicostas, Aug 02 2019: (Start)
Conjecture: For n >= 0, let P be the set of all possible lists (a_1, ..., a_n) of nonnegative integers such that a_1*1 + a_2*2 + ... + a_n*n = n. Consider terms of the form multinomial(n*m, m*[1,..., 1, 2,..., 2,..., n,..., n]) * multinomial(a_1 + ... + a_n, [a_1,..., a_n]), where in the list [1,..., 1, 2,..., 2,..., n,..., n] the number 1 occurs a_1 times, 2 occurs a_2 times, ..., and n occurs a_n times. (Here a_n = 0 or 1.) Summing these terms over P we get A(m, n) provided m >= 1. (End)

A318144 T(n, k) = (-1)^k*k!*P(n, k), where P(n, k) is the number of partitions of n of length k. Triangle read by rows, 0 <= k <= n.

Original entry on oeis.org

1, 0, -1, 0, -1, 2, 0, -1, 2, -6, 0, -1, 4, -6, 24, 0, -1, 4, -12, 24, -120, 0, -1, 6, -18, 48, -120, 720, 0, -1, 6, -24, 72, -240, 720, -5040, 0, -1, 8, -30, 120, -360, 1440, -5040, 40320, 0, -1, 8, -42, 144, -600, 2160, -10080, 40320, -362880
Offset: 0

Views

Author

Peter Luschny, Aug 20 2018

Keywords

Examples

			[0] [1],
[1] [0, -1],
[2] [0, -1, 2],
[3] [0, -1, 2,  -6],
[4] [0, -1, 4,  -6,  24],
[5] [0, -1, 4, -12,  24, -120],
[6] [0, -1, 6, -18,  48, -120,  720],
[7] [0, -1, 6, -24,  72, -240,  720,  -5040],
[8] [0, -1, 8, -30, 120, -360, 1440,  -5040, 40320],
[9] [0, -1, 8, -42, 144, -600, 2160, -10080, 40320, -362880]
		

Crossrefs

Row sums are A260845, absolute row sums are A101880.

Programs

  • Magma
    /* As triangle: */
    [[(-1)^k*#Partitions(n,k)*Factorial(k): k in [0..n]]: n in [0..10]]; // Bruno Berselli, Aug 20 2018
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>1,
          b(n, i-1), 0)+expand(b(n-i, min(n-i, i))*x))
        end:
    T:= n-> (p-> seq(i!*coeff(p, x, i)*(-1)^i, i=0..n))(b(n$2)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Sep 18 2019
  • Mathematica
    t[n_, k_] := (-1)^k  k! (IntegerPartitions[n, {k}] // Length);
    Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i > 1,
         b[n, i - 1], 0] + Expand[b[n - i, Min[n - i, i]]*x]];
    T[n_] := Function[p, Table[i!*Coefficient[p, x, i]*(-1)^i, {i, 0, n}]][ b[n, n]];
    T /@ Range[0, 14] // Flatten (* Jean-François Alcover, Jun 07 2021, after Alois P. Heinz *)
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    def A318144row(n):
        return [(-1)^k*number_of_partitions_length(n, k)*factorial(k) for k in (0..n)]
    for n in (0..9): print(A318144row(n))
    

A331517 a(n) = Sum_{k=0..n} p(n,k) * !k, where p(n,k) = number of partitions of n into k parts and !k = subfactorial of k.

Original entry on oeis.org

1, 0, 1, 3, 13, 59, 336, 2245, 17408, 153124, 1505420, 16342711, 194060616, 2501178199, 34766184181, 518332353130, 8250146291076, 139618375340912, 2503167665128431, 47393482639721484, 944910760664087791, 19787603213440946946, 434229133448518143203
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 19 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Length[IntegerPartitions[n, {k}]] Subfactorial[k], {k, 0, n}], {n, 0, 22}]
    nmax = 22; CoefficientList[Series[Sum[Subfactorial[k] x^k/Product[(1 - x^j), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} !k * x^k / Product_{j=1..k} (1 - x^j).
a(n) ~ exp(-1) * n! * (1 + 1/n + 2/n^2 + 5/n^3 + 16/n^4 + 60/n^5 + 253/n^6 + 1180/n^7 + 6023/n^8 + 33306/n^9 + 197719/n^10 + ...), for coefficients see A331826. - Vaclav Kotesovec, Jan 28 2020

A160564 Sum of products of factorials of parts times the factorial of the number of parts in all integer partitions of n.

Original entry on oeis.org

1, 1, 4, 16, 80, 420, 2592, 17352, 132240, 1117200, 10559040, 110276352, 1268640000, 15923168640, 216767367936, 3178157607936, 49918919122944, 835744605027840, 14852897362759680, 279172076525153280, 5531978038112409600, 115241366146485749760
Offset: 0

Views

Author

Geoffrey Critzer, May 19 2009

Keywords

Comments

Take each Ferrers diagram of the partitions of n, label the cells within each row and then linearly order the rows.

Examples

			a(3) = 16 because the partitions of 3 can be so ordered in 16 ways: 3 (6); 2,1 (4); 1,1,1 (6).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j)*i!^j, j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..23);  # Alois P. Heinz, Oct 02 2017
  • Mathematica
    p = Table[Map[Function[n, Apply[Times, n! ]], Partitions[i]], {i, 0, 20}]; q = Table[Map[Function[n, Length[n]! ], Partitions[i]], {i, 0, 20}]; Map[Function[n, Apply[Plus, n]], p*q]

A331336 L.g.f.: log(Sum_{k>=0} k! * x^k / Product_{j=1..k} (1 - x^j)).

Original entry on oeis.org

1, 5, 19, 97, 571, 4109, 33643, 310321, 3167101, 35427605, 430918489, 5663534761, 79999275253, 1208843786897, 19460746819099, 332560305456673, 6012905371554295, 114689550634547009, 2301617124055928731, 48479953395028134577, 1069433968820519576377
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 14 2020

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 21; CoefficientList[Series[Log[Sum[k! x^k/Product[1 - x^j, {j, 1, k}], {k, 0, nmax}]], {x, 0, nmax}], x] Range[0, nmax] // Rest

Formula

exp(Sum_{n>=1} a(n) * x^n / n) = g.f. of A101880.
a(n) = n * A101880(n) - Sum_{k=1..n-1} A101880(k) * a(n-k).
a(n) ~ n * n! * (1 - 1/n^2 - 6/n^3 - 38/n^4 - 276/n^5 - 2354/n^6 - 23458/n^7 - 268991/n^8 - 3490842/n^9 - 50520252/n^10 - ...). - Vaclav Kotesovec, Jan 28 2020

A179863 Array of the factorials A049085(n,k)!, read by rows n.

Original entry on oeis.org

1, 2, 1, 6, 2, 1, 24, 6, 2, 2, 1, 120, 24, 6, 6, 2, 2, 1, 720, 120, 24, 6, 24, 6, 2, 6, 2, 2, 1, 5040, 720, 120, 24, 120, 24, 6, 6, 24, 6, 2, 6, 2, 2, 1, 40320, 5040, 720, 120, 24, 720, 120, 24, 24, 6, 120, 24, 6, 6, 2, 24, 6, 2, 6, 2, 2, 1, 362880, 40320, 5040, 720, 120, 5040, 720, 120
Offset: 1

Views

Author

Alford Arnold, Jul 29 2010

Keywords

Comments

Row n has A000041(n) terms.

Examples

			A049085 begins
1
2 1
3 2 1
4 3 2 2 1
5 4 3 3 2 2 1 ...
so this array begins
1
2 1
6 2 1
24 6 2 2 1
120 24 6 6 2 2 1 ...
		

Crossrefs

Cf. A000041, A000142, A101880 (row sums).

Formula

T(n,k) = A000142(A049085(n,k)).
Showing 1-10 of 10 results.