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

A001680 The partition function G(n,3).

Original entry on oeis.org

1, 1, 2, 5, 14, 46, 166, 652, 2780, 12644, 61136, 312676, 1680592, 9467680, 55704104, 341185496, 2170853456, 14314313872, 97620050080, 687418278544, 4989946902176, 37286121988256, 286432845428192, 2259405263572480, 18280749571449664, 151561941235370176
Offset: 0

Views

Author

Keywords

Comments

Number of '12-3 and 21-3'-avoiding permutations.
Set partitions into sets of size at most 3. The e.g.f. for partitions into sets of size at most s is exp( sum(j=1..s, x^j/j!) ). [Joerg Arndt, Dec 07 2012]
Also called restricted Stirling numbers of the second kind (see Mezo). - N. J. A. Sloane, Nov 27 2013

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

Column k=3 of A229223.

Programs

  • Maple
    G:= proc(n, i) option remember;
          `if`(n=0, 1, `if`(i<1, 0,
           add(G(n-i*j, i-1) *n!/i!^j/(n-i*j)!/j!, j=0..n/i)))
        end:
    a:= n-> G(n, 3):
    seq(a(n), n=0..30); # Alois P. Heinz, Apr 20 2012
    # Recurrence:
    rec := {(-n^2-3*n-2)*f(n)+(-2*n-4)*f(n+1)-2*f(n+2)+2*f(n+3)=0,f(0)=1,f(1)=1,f(2)=2}:
    aList := gfun:-rectoproc(rec,f(n),list): aList(25); # Peter Luschny, Feb 26 2018
  • Mathematica
    Table[Sum[n!/(m!2^(n+j-2m)3^(m-j))Binomial[m,j]Binomial[j,n+2j-3m],{m,0,n},{j,0,3m-n}],{n,0,15}]

Formula

E.g.f.: exp ( x + x^2 / 2 + x^3 / 6 ).
a(n) = n! * sum(k=1..n, 1/k! * sum(j=0..k, C(k,j) * C(j,n-3*k+2*j) * 2^(-n+2*k-j) * 3^(j-k))). [Vladimir Kruchinin, Jan 25 2011]
a(n) = G(n,3) with G(0,i) = 1, G(n,i) = 0 for n>0 and i<1, otherwise G(n,i) = Sum_{j=0..floor(n/i)} G(n-i*j,i-1) * n!/(i!^j*(n-i*j)!*j!). - Alois P. Heinz, Apr 20 2012
D-finite with recurrence 2*a(n) -2*a(n-1) +2*(-n+1)*a(n-2) -(n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Jan 25 2013
Proof of foregoing recurrence: The partition containing n can be a singleton (a(n-1) partitions of the remaining terms), a doubleton ((n-1) choices for its companion times a(n-2) partitions of the remaining terms) or a tripleton ((n-1) choose 2 choices for its companions times a(n-3) partitions for the remaining terms), so a(n) = a(n-1) + (n-1)a(n-2) + (n-1)*(n-2)/2 * a(n-3). - Micah E. Fogel, Feb 14 2013
a(n) ~ n^(2*n/3)*exp(1/2*(2*n)^(2/3)+2/3*(2*n)^(1/3)-2*n/3-4/9)/(sqrt(3)*2^(n/3)). - Vaclav Kotesovec, May 29 2013

Extensions

More terms added May 13 2009

A080599 Expansion of e.g.f.: 2/(2-2*x-x^2).

Original entry on oeis.org

1, 1, 3, 12, 66, 450, 3690, 35280, 385560, 4740120, 64751400, 972972000, 15949256400, 283232149200, 5416632421200, 110988861984000, 2425817682288000, 56333385828720000, 1385151050307024000, 35950878932544576000, 982196278209226080000, 28175806418228108640000
Offset: 0

Views

Author

Detlef Pauly (dettodet(AT)yahoo.de), Feb 24 2003

Keywords

Comments

Number of ordered partitions of {1,..,n} with at most 2 elements per block. - Bob Proctor, Apr 18 2005
In other words, number of preferential arrangements of n things (see A000670) in which each clump has size 1 or 2. - N. J. A. Sloane, Apr 13 2014
Recurrences (of the hypergeometric type of the Jovovic formula) mean: multiplying the sequence vector from the left with the associated matrix of the recurrence coefficients (here: an infinite lower triangular matrix with the natural numbers in the main diagonal and the triangular series in the subdiagonal) recovers the sequence up to an index shift. In that sense, this sequence here and many other sequences of the OEIS are eigensequences. - Gary W. Adamson, Feb 14 2011
Number of intervals in the weak (Bruhat) order of S_n that are Boolean algebras. - Richard Stanley, May 09 2011
a(n) = D^n(1/(1-x)) evaluated at x = 0, where D is the operator sqrt(1+2*x)*d/dx. Cf. A000085, A005442 and A052585. - Peter Bala, Dec 07 2011
From Gus Wiseman, Jul 04 2020: (Start)
Also the number of (1,1,1)-avoiding or cubefree sequences of length n covering an initial interval of positive integers. For example, the a(0) = 1 through a(3) = 12 sequences are:
() (1) (11) (112)
(12) (121)
(21) (122)
(123)
(132)
(211)
(212)
(213)
(221)
(231)
(312)
(321)
(End)

Examples

			From _Gus Wiseman_, Jul 04 2020: (Start)
The a(0) = 1 through a(3) = 12 ordered set partitions with block sizes <= 2 are:
  {}  {{1}}  {{1,2}}    {{1},{2,3}}
             {{1},{2}}  {{1,2},{3}}
             {{2},{1}}  {{1,3},{2}}
                        {{2},{1,3}}
                        {{2,3},{1}}
                        {{3},{1,2}}
                        {{1},{2},{3}}
                        {{1},{3},{2}}
                        {{2},{1},{3}}
                        {{2},{3},{1}}
                        {{3},{1},{2}}
                        {{3},{2},{1}}
(End)
		

Crossrefs

Column k=2 of A276921.
Cubefree numbers are A004709.
(1,1)-avoiding patterns are A000142.
(1,1,1)-avoiding compositions are A232432.
(1,1,1)-matching patterns are A335508.
(1,1,1)-avoiding permutations of prime indices are A335511.
(1,1,1)-avoiding compositions are ranked by A335513.
(1,1,1,1)-avoiding patterns are A189886.

Programs

  • Magma
    [n le 2 select 1 else (n-1)*Self(n-1) + Binomial(n-1,2)*Self(n-2): n in [1..31]]; // G. C. Greubel, Jan 31 2023
    
  • Maple
    a:= n-> n! *(Matrix([[1,1], [1/2,0]])^n)[1,1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 01 2009
    a:= gfun:-rectoproc({a(n) = n*a(n-1)+(n*(n-1)/2)*a(n-2),a(0)=1,a(1)=1},a(n),remember):
    seq(a(n), n=0..40); # Robert Israel, Nov 01 2015
  • Mathematica
    Table[n!*SeriesCoefficient[-2/(-2+2*x+x^2),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 13 2012 *)
    Round@Table[n! ((1+Sqrt[3])^(n+1) - (1-Sqrt[3])^(n+1))/(2^(n+1) Sqrt[3]), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 31 2015 *)
  • PARI
    Vec(serlaplace((2/(2-2*x-x^2) + O(x^30)))) \\ Michel Marcus, Nov 02 2015
    
  • SageMath
    A002605=BinaryRecurrenceSequence(2,2,0,1)
    def A080599(n): return factorial(n)*A002605(n+1)/2^n
    [A080599(n) for n in range(41)] # G. C. Greubel, Jan 31 2023

Formula

a(n) = n*a(n-1) + (n*(n-1)/2)*a(n-2). - Vladeta Jovovic, Aug 22 2003
E.g.f.: 1/(1-x-x^2/2). - Richard Stanley, May 09 2011
a(n) ~ n!*((1+sqrt(3))/2)^(n+1)/sqrt(3). - Vaclav Kotesovec, Oct 13 2012
a(n) = n!*((1+sqrt(3))^(n+1) - (1-sqrt(3))^(n+1))/(2^(n+1)*sqrt(3)). - Vladimir Reshetnikov, Oct 31 2015
a(n) = A090932(n) * A002530(n+1). - Robert Israel, Nov 01 2015

A276921 Number A(n,k) of ordered set partitions of [n] with at most k elements per block; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 3, 6, 0, 1, 1, 3, 12, 24, 0, 1, 1, 3, 13, 66, 120, 0, 1, 1, 3, 13, 74, 450, 720, 0, 1, 1, 3, 13, 75, 530, 3690, 5040, 0, 1, 1, 3, 13, 75, 540, 4550, 35280, 40320, 0, 1, 1, 3, 13, 75, 541, 4670, 45570, 385560, 362880, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 22 2016

Keywords

Examples

			Square array A(n,k) begins:
  1,    1,     1,     1,     1,     1,     1,     1, ...
  0,    1,     1,     1,     1,     1,     1,     1, ...
  0,    2,     3,     3,     3,     3,     3,     3, ...
  0,    6,    12,    13,    13,    13,    13,    13, ...
  0,   24,    66,    74,    75,    75,    75,    75, ...
  0,  120,   450,   530,   540,   541,   541,   541, ...
  0,  720,  3690,  4550,  4670,  4682,  4683,  4683, ...
  0, 5040, 35280, 45570, 47110, 47278, 47292, 47293, ...
		

Crossrefs

Main diagonal gives A000670.
Cf. A276922.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, add(
           A(n-i, k)*binomial(n, i), i=1..min(n, k)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n==0, 1, Sum[A[n-i, k]*Binomial[n, i], {i, 1, Min[n, k]}]]; Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 03 2017, translated from Maple *)

Formula

E.g.f. of column k: 1/(1-Sum_{i=1..k} x^i/i!).
A(n,k) = Sum_{j=0..k} A276922(n,j).

A364324 a(n) = n!*tribonacci(n+2).

Original entry on oeis.org

1, 1, 4, 24, 168, 1560, 17280, 221760, 3265920, 54069120, 994291200, 20118067200, 444034483200, 10617070464000, 273391121203200, 7542665754624000, 221969877921792000, 6940528784437248000, 229781192298577920000, 8030036368187817984000, 295390797322766745600000
Offset: 0

Views

Author

Enrique Navarrete, Jul 18 2023

Keywords

Comments

a(n) is the number of ways to partition [n] into blocks of size at most 3, order the blocks, and order the elements within each block.

Examples

			a(5) = 1560 since the number of ways to partition [5] into blocks of size at most 3, order the blocks, and order the elements within each block are the following:
1) 1,2,3,4,5: 120 ordered blocks; 120 ways;
2) 12,3,4,5: 240 ordered blocks; 480 ways;
3) 12,34,5: 90 ordered blocks; 360 ways;
4) 123,45: 20 ordered blocks; 240 ways;
5) 123,4,5: 60 ordered blocks; 360 ways.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          a(n-i)*binomial(n, i)*i!, i=1..min(n, 3)))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Jul 18 2023
  • Mathematica
    With[{m = 21}, Range[0, m - 1]! * LinearRecurrence[{1, 1, 1}, {1, 1, 2}, m]] (* Amiram Eldar, Jul 28 2023 *)

Formula

E.g.f.: 1/(1-x-x^2-x^3).
a(n) = A000142(n) * A000073(n+2).

A320759 Number of ordered set partitions of [n] where the maximal block size equals three.

Original entry on oeis.org

1, 8, 80, 860, 10290, 136080, 1977360, 31365600, 539847000, 10026139200, 199937337600, 4262167509600, 96744738090000, 2329950823200000, 59348032327584000, 1594257675506496000, 45047749044458160000, 1335740755933584000000, 41473196779273459200000
Offset: 3

Views

Author

Alois P. Heinz, Oct 20 2018

Keywords

Crossrefs

Column k=3 of A276922.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(
          b(n-i, k)*binomial(n, i), i=1..min(n, k)))
        end:
    a:= n-> (k-> b(n, k) -b(n, k-1))(3):
    seq(a(n), n=3..25);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - i, k] Binomial[n, i], {i, 1, Min[n, k]}]];
    a[n_] := With[{k = 3}, b[n, k] - b[n, k-1]];
    a /@ Range[3, 25] (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)

Formula

E.g.f.: 1/(1-Sum_{i=1..3} x^i/i!) - 1/(1-Sum_{i=1..2} x^i/i!).
a(n) = A189886(n) - A080599(n).

A320760 Number of ordered set partitions of [n] where the maximal block size equals four.

Original entry on oeis.org

1, 10, 120, 1540, 21490, 326970, 5402250, 96500250, 1855334250, 38228190000, 840776937000, 19666511865000, 487617137007000, 12776791730703000, 352825452012033000, 10242418813814187000, 311854958169459705000, 9937942309809373860000, 330821844137019184950000
Offset: 4

Views

Author

Alois P. Heinz, Oct 20 2018

Keywords

Crossrefs

Column k=4 of A276922.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(
          b(n-i, k)*binomial(n, i), i=1..min(n, k)))
        end:
    a:= n-> (k-> b(n, k) -b(n, k-1))(4):
    seq(a(n), n=4..25);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - i, k] Binomial[n, i], {i, 1, Min[n, k]}]];
    a[n_] := With[{k = 4}, b[n, k] - b[n, k-1]];
    a /@ Range[4, 25] (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)

Formula

E.g.f.: 1/(1-Sum_{i=1..4} x^i/i!) - 1/(1-Sum_{i=1..3} x^i/i!).
a(n) = A276924(n) - A189886(n).

A355293 Expansion of e.g.f. 1 / (1 - x - x^2/2 - x^3/3).

Original entry on oeis.org

1, 1, 3, 14, 82, 610, 5450, 56700, 674520, 9027480, 134236200, 2195701200, 39180094800, 757389032400, 15767305554000, 351689317980000, 8367381470448000, 211518767796336000, 5661504152255952000, 159954273475764768000, 4757034049019572320000, 148547713504322452320000, 4859583724723970642400000
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 27 2022

Keywords

Crossrefs

Programs

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

Formula

a(n) = n * a(n-1) + n * (n-1) * a(n-2) / 2 + n * (n-1) * (n-2) * a(n-3) / 3.

A366942 Expansion of e.g.f. 1/(1-x-2*x^2-3*x^3).

Original entry on oeis.org

1, 1, 6, 48, 408, 5040, 72000, 1184400, 22619520, 482993280, 11459750400, 299495750400, 8531976499200, 263353163673600, 8754879893760000, 311808414677760000, 11845876873678848000, 478163414336864256000, 20436460099541950464000, 921972301728418676736000
Offset: 0

Views

Author

Enrique Navarrete, Oct 29 2023

Keywords

Comments

a(n) is the number of ways to partition [n] into blocks of size at most 3, order the blocks, order the elements within each block, and choose 1 element from each block.
E.g.: a(4) = 408 since we have the following cases:
1,2,3,4: 24 such orderings, 1 way to choose one element from each block;
12,34: 24 such orderings, 2*2 ways to choose one element from each block;
12,3,4: 72 such orderings, 2*1*1 ways to choose one element from each block;
123,4: 48 such orderings, 3*1 ways to choose one element from each block;
so 24*1 + 24*4 + 72*2 + 48*3 = 408 ways.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          a(n-j)*binomial(n, j)*j!*j, j=1..min(3, n)))
        end:
    seq(a(n), n=0..19);  # Alois P. Heinz, Dec 14 2023
  • Mathematica
    With[{m = 20}, Range[0, m]! * CoefficientList[Series[1/(1 - x - 2*x^2 - 3*x^3), {x, 0, m}], x]] (* Amiram Eldar, Oct 30 2023 *)
  • PARI
    my(x='x+O('x^25)); Vec(serlaplace(1/(1-x-2*x^2-3*x^3))) \\ Michel Marcus, Oct 30 2023

Formula

a(n) = A000142(n)*A101822(n).
a(n) = n*(a(n-1)+(n-1)*(2*a(n-2)+(n-2)*3*a(n-3))) for n>=3. - Alois P. Heinz, Dec 14 2023

A366950 Expansion of e.g.f. exp(x^2+3*x^3).

Original entry on oeis.org

1, 0, 2, 18, 12, 360, 3360, 7560, 183120, 1814400, 8195040, 184615200, 1976546880, 14166472320, 310589959680, 3634245014400, 36092331475200, 787170153369600, 10123771065408000, 127736406404006400, 2807613032557132800, 39732753299855616000
Offset: 0

Views

Author

Enrique Navarrete, Oct 29 2023

Keywords

Comments

For n>0, a(n) is the number of ways to partition [n] into unordered blocks of size at most 3, order the elements within each block, and choose 2 elements from each block.
For example, a(2)=2 since the blocks with ordered elements are 12 and 21 and there is only one way to choose 2 elements from each block.

Examples

			a(6)=3360 since the number of ways to partition [6] into unordered blocks of size at most 3, order the elements within each block, and select 2 elements from each block are the following:
1) 12,34,56: 120 ways to order elements in unordered blocks, 1 way to choose 2 elements from each block, hence 120 ways;
2) 123,456: 360 ways to order elements in unordered blocks, 3*3 ways to choose 2 elements from each block, hence 3240 ways.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 21}, Range[0, m]! * CoefficientList[Series[Exp[x^2 + 3*x^3], {x, 0, m}], x]] (* Amiram Eldar, Oct 30 2023 *)

Formula

a(n) ~ 3^(2*n/3 - 1/2) * n^(2*n/3) * exp(4/729 - 2*3^(-11/3)*n^(1/3) + 3^(-4/3)*n^(2/3) - 2*n/3). - Vaclav Kotesovec, Nov 02 2023

A365330 Expansion of e.g.f. x^3/(1-x-x^2-x^3)^2.

Original entry on oeis.org

0, 0, 0, 6, 48, 600, 8640, 131040, 2257920, 42819840, 885427200, 19918483200, 483791616000, 12622171161600, 352200296448000, 10466625641472000, 330077933273088000, 11010660024139776000, 387369218691366912000, 14335266857678807040000, 556691771706962411520000
Offset: 0

Views

Author

Enrique Navarrete, Sep 01 2023

Keywords

Comments

a(n) is the number of ways to partition [n] into blocks of size at most 3, order the blocks, order the elements within each block, and choose 3 elements from a block.

Examples

			a(6)=8640 since the ways to partition [6] into blocks of size at most 3, order the blocks, order the elements within each block, and select 3 elements from a block are the following:
  (i) 123,4,5,6: 2880 such orderings, 1 way to choose three elements (from the block with 3 elements), hence 2880 ways;
  (ii) 123,45,6: 4320 such orderings, 1 way to choose three elements (from the block with 3 elements), hence 4320 ways;
  (iii) 123,456: 720 such orderings, 2 ways to choose three elements (from one of the two blocks with 3 elements), hence 1440 ways.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 20}, Range[0, m]! * CoefficientList[Series[x^3/(1 - x - x^2 - x^3)^2, {x, 0, m}], x]] (* Amiram Eldar, Sep 02 2023 *)

Formula

a(n) = A000142(n)*A073778(n+1).
Showing 1-10 of 11 results. Next