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-5 of 5 results.

A059022 Triangle of Stirling numbers of order 3.

Original entry on oeis.org

1, 1, 1, 1, 10, 1, 35, 1, 91, 1, 210, 280, 1, 456, 2100, 1, 957, 10395, 1, 1969, 42735, 15400, 1, 4004, 158301, 200200, 1, 8086, 549549, 1611610, 1, 16263, 1827826, 10335325, 1401400, 1, 32631, 5903898, 57962905, 28028000, 1, 65382, 18682014, 297797500
Offset: 3

Views

Author

Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Dec 14 2000

Keywords

Comments

The number of partitions of the set N, |N|=n, into k blocks, all of cardinality greater than or equal to 3. This is the 3-associated Stirling number of the second kind (Comtet) or the Stirling number of order 3 (Fekete).
This is entered as a triangular array. The entries S_3(n,k) are zero for 3k>n, so these values are omitted. The initial entry in the sequence is S_3(3,1).
Rows are of lengths 1,1,1,2,2,2,3,3,3,...

Examples

			There are 10 ways of partitioning a set N of cardinality 6 into 2 blocks each of cardinality at least 3, so S_3(6,2) = 10.
From _Wesley Ivan Hurt_, Feb 24 2022: (Start)
Triangle starts:
  1;
  1;
  1;
  1,   10;
  1,   35;
  1,   91;
  1,  210,   280;
  1,  456,  2100;
  1,  957, 10395;
  1, 1969, 42735, 15400;
  ...
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 222.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 76.

Crossrefs

Row sums give A006505.
Cf. A008299, A059023, A059024, A059025, A100861, A272352 (column 2), A272982 (column 3), A261724 (column 4), A352611 (column 5).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          expand(x*b(n-j))*binomial(n-1, j-1), j=3..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n)):
    seq(T(n), n=3..20);  # Alois P. Heinz, Feb 21 2022
    # alternative
    A059022 := proc(n, k)
        option remember;
        if n<3 then
            0;
        elif n < 6 and k=1 then
            1 ;
        else
            k*procname(n-1, k)+binomial(n-1, 2)*procname(n-3, k-1) ;
        end if;
    end proc:  # R. J. Mathar, Apr 15 2022
  • Mathematica
    S3[3, 1] = S3[4, 1] = S3[5, 1] = 1; S3[n_, k_] /; 1 <= k <= Floor[n/3] := S3[n, k] = k*S3[n-1, k] + Binomial[n-1, 2]*S3[n-3, k-1]; S3[, ] = 0; Flatten[ Table[ S3[n, k], {n, 3, 20}, {k, 1, Floor[n/3]}]] (* Jean-François Alcover, Feb 21 2012 *)

Formula

S_r(n+1,k) = k*S_r(n,k) + binomial(n,r-1)*S_r(n-r+1,k-1); for this sequence, r=3.
G.f.: Sum_{n>=0, k>=0} S_r(n,k)*u^k*t^n/n! = exp(u(e^t - Sum_{i=0..r-1} t^i/i!)).
T(n,k) = Sum_{j=0..min(n/2,k)} (-1)^j*B(n,j)*S_2(n-2j,k-j), where B are the Bessel numbers A100861 and S_2 are the 2-associated Stirling numbers of the second kind A008299. - Fabián Pereyra, Feb 20 2022

A261724 a(n) is the number of ways of putting n labeled balls into 4 indistinguishable boxes such that each box contains at least 3 balls.

Original entry on oeis.org

15400, 200200, 1611610, 10335325, 57962905, 297797500, 1439774336, 6662393738, 29844199346, 130445781284, 559533979466, 2365296391535, 9885290914059, 40944327590760, 168389163468240, 688631376550260, 2803570746766140, 11373212443859760, 46006062639998890
Offset: 12

Views

Author

Vincenzo Librandi, May 17 2016

Keywords

Comments

Linear recurrence signature is given by the terms of A255002 after -1. - Bruno Berselli, May 20 2016

Crossrefs

Cf. A000478, A058844, A272352, A272982, column 4 of A059022.

Programs

  • Magma
    [(1/12)*(-3^(n-2)*(n^2+5*n+18)+(1/64)*(2^(2*n+5)+3*2^n*(n^4+2*n^3+19*n^2+42*n+64)-16*(n^6-9*n^5+43*n^4-91*n^3+112*n^2-32*n+8))): n in [12..40]];
    
  • Mathematica
    Table[(1/12) (-(3^(n - 2) (n^2 + 5 n + 18)) + (1/64) (2^(2 n + 5) + 3 2^n (n^4 + 2 n^3 + 19 n^2 + 42 n + 64) - 16 (n^6 - 9 n^5 + 43 n^4 - 91 n^3 + 112 n^2 - 32 n + 8))), {n, 12, 40}]
  • PARI
    Vec(x^12*(15400 -261800*x +1996610*x^2 -9045575*x^3 +27162905*x^4 -57079715*x^5 +86268721*x^6 -94696602*x^7 +75062256*x^8 -41952000*x^9 +15705360*x^10 -3538080*x^11 +362880*x^12) / ((1 -x)^7*(1 -2*x)^5*(1 -3*x)^3*(1 -4*x)) + O(x^30)) \\ Colin Barker, May 24 2016

Formula

a(n) = (1/12)*(-3^(n - 2)*(n^2 + 5*n + 18) + (1/64)*(2^(2*n + 5) + 3*2^n*(n^4 + 2*n^3 + 19*n^2 + 42*n + 64) - 16*(n^6 - 9*n^5 + 43*n^4 - 91*n^3 + 112*n^2 - 32*n + 8))).
G.f.: x^12*(15400 -261800*x +1996610*x^2 -9045575*x^3 +27162905*x^4 -57079715*x^5 +86268721*x^6 -94696602*x^7 +75062256*x^8 -41952000*x^9 +15705360*x^10 -3538080*x^11 +362880*x^12) / ((1 -x)^7*(1 -2*x)^5*(1 -3*x)^3*(1 -4*x)). - Colin Barker, May 24 2016

Extensions

Definition, data and formula corrected by Istvan Mezo and Bruno Berselli, May 20 2016

A272982 a(n) is the number of ways of putting n labeled balls into 3 indistinguishable boxes such that each box contains at least 3 balls.

Original entry on oeis.org

280, 2100, 10395, 42735, 158301, 549549, 1827826, 5903898, 18682014, 58257810, 179765973, 550478241, 1676305723, 5083927299, 15372843684, 46383762084, 139730030100, 420448298400, 1264071094975, 3798101973315, 11406989362185, 34248214131465, 102803026929030, 308533903071390
Offset: 9

Views

Author

Vincenzo Librandi, May 12 2016

Keywords

Examples

			For n=9, label the balls A through I. The box containing ball A can contain 8*7/2 = 28 combinations of other balls. There are 6 balls for the other two boxes, so there are A272352(6) = 10 combinations for those two boxes. Thus, a(9) = 28*10 = 280. - _Michael B. Porter_, Jul 01 2016
		

Crossrefs

Cf. A000478, A058844, A261724, A272352, column 3 of A059022.

Programs

  • Magma
    [(1/3)*(1/16)*(6*n^4-12*n^3-3*2^n*n^2+42*n^2-9*2^n*n+12*n+8*3^n-3*2^(n+3)+24): n in [9..40]];
    
  • Mathematica
    Table[(1/3) (1/16) (6 n^4 - 12 n^3 - 3 2^n n^2 + 42 n^2 - 9 2^n n + 12 n + 8 3^n - 3 2^(n + 3) + 24), {n, 9, 40}]
    CoefficientList[Series[(280 - 1820*x + 4795*x^2 - 6615*x^3 + 5106*x^4 - 2100*x^5 + 360*x^6)/((1 - 3*x)*(1 - 2*x)^3*(1 - x)^5), {x, 0, 40}], x] (* Stefano Spezia, Oct 04 2018 *)
  • PARI
    Vec(x^9*(280 - 1820*x + 4795*x^2 - 6615*x^3 + 5106*x^4 - 2100*x^5 + 360*x^6)/((1 - 3*x)*(1 - 2*x)^3*(1 - x)^5) + O(x^40)) \\ Stefano Spezia, Oct 04 2018

Formula

G.f.: x^9*(280 - 1820*x + 4795*x^2 - 6615*x^3 + 5106*x^4 - 2100*x^5 + 360*x^6)/((1 - 3*x)*(1 - 2*x)^3*(1 - x)^5).
a(n) = (1/3)*(1/16)*(6*n^4 - 12*n^3 - 3*2^n*n^2 + 42*n^2 - 9*2^n*n + 12*n + 8*3^n - 3*2^(n+3) + 24).
a(n) = 3*a(n-1) + C(n-1,2)*(2^(n-4) + 2 - n - C(n-3, 2)), a(n)=0, n < 9. - Vladimir Kruchinin, Oct 04 2018

Extensions

Data, formulas and programs corrected for erroneous formula in Mezo's paper by Bruno Berselli, May 21 2016

A201385 Irregular triangle T(n,k) (n >= 1, k >= 1) read by rows: T(n,1) = 2^n - 1; for k>1, T(n,k) = 0 for n <= 2*(k-1); otherwise T(n+1,k) = T(n,k-1) + T(n,k).

Original entry on oeis.org

1, 3, 7, 3, 15, 10, 31, 25, 10, 63, 56, 35, 127, 119, 91, 35, 255, 246, 210, 126, 511, 501, 456, 336, 126, 1023, 1012, 957, 792, 462, 2047, 2035, 1969, 1749, 1254, 462, 4095, 4082, 4004, 3718, 3003, 1716, 8191, 8177, 8086, 7722, 6721, 4719, 1716
Offset: 1

Views

Author

Jonathan Vos Post, Nov 30 2011

Keywords

Comments

A "Pascal Staircase".
The zero entries simplify the definition, but are not part of the official triangle.

Examples

			Triangle begins:
    1
    3
    7   3
   15  10
   31  25 10
   63  56 35
  127 119 91 35
  ...
		

Crossrefs

Columns k = 1, 2, 3 give A000225, A000247, A272352(n+1).
Row sums give A130783.

Programs

  • Mathematica
    With[{rowmax=20},DeleteCases[Transpose[PadLeft[NestWhileList[Accumulate[#[[2;;-2]]]&,2^Range[rowmax]-1,Length[#]>2&]]],0,2]] (* Paolo Xausa, Nov 07 2023 *)

Extensions

Entry revised by N. J. A. Sloane, Nov 07 2023

A322291 Triangle T read by rows: T(n, k) = Sum_{i=1..k} binomial(n, floor((n-k)/2)+i).

Original entry on oeis.org

1, 2, 3, 3, 6, 7, 6, 10, 14, 15, 10, 20, 25, 30, 31, 20, 35, 50, 56, 62, 63, 35, 70, 91, 112, 119, 126, 127, 70, 126, 182, 210, 238, 246, 254, 255, 126, 252, 336, 420, 456, 492, 501, 510, 511, 252, 462, 672, 792, 912, 957, 1002, 1012, 1022, 1023, 462, 924, 1254, 1584, 1749, 1914, 1969, 2024, 2035, 2046, 2047
Offset: 1

Views

Author

Stefano Spezia, Aug 28 2019

Keywords

Comments

T(n, k) is a sharp upper bound on the cardinality of a k-antichain in {0, 1}^n due to P. Erdős.
T(n, k) is also the total number of compositions with first part k, n+1 parts, and all differences between adjacent parts in {-1,1}. - John Tyler Rascoe, May 07 2023

Examples

			n\k|   1    2    3    4    5    6
---+-----------------------------
1  |   1
2  |   2    3
3  |   3    6    7
4  |   6   10   14   15
5  |  10   20   25   30   31
6  |  20   35   50   56   62   63
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..11], n->List([1..n], k->Sum([1..k], i->Binomial(n, Int((n-k)/2)+i)))));
    
  • Maple
    a:=(n, k)->sum(binomial(n, floor((1/2)*n-(1/2)*k)+i), i = 1..k): seq(seq(a(n, k), k = 1..n), n = 1..11);
  • Mathematica
    T[n_,k_]:=Sum[Binomial[n,Floor[(n-k)/2]+i],{i,1,k}]; Table[T[n,k],{n,1,11},{k,1,n}]
  • PARI
    T(n, k) = sum(i=1, k, binomial(n, floor((n-k)/2)+i));

Formula

T(n, n) = A000225(n).
T(n, n-1) = A000918(n).
T(n, n-2) = A000247(n).
T(n, n-3) = A052515(n).
T(n, n-4) = A272352(n+1).
T(n, n-5) = A052516(n).
Showing 1-5 of 5 results.