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

A292508 Number A(n,k) of partitions of n with k kinds of 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 2, 1, 1, 3, 4, 3, 2, 1, 4, 7, 7, 5, 2, 1, 5, 11, 14, 12, 7, 4, 1, 6, 16, 25, 26, 19, 11, 4, 1, 7, 22, 41, 51, 45, 30, 15, 7, 1, 8, 29, 63, 92, 96, 75, 45, 22, 8, 1, 9, 37, 92, 155, 188, 171, 120, 67, 30, 12, 1, 10, 46, 129, 247, 343, 359, 291, 187, 97, 42, 14
Offset: 0

Views

Author

Alois P. Heinz, Sep 17 2017

Keywords

Comments

Partial sum operator applied to column k gives column k+1.
A(n,k) is also defined for k < 0. All given formulas and programs can be applied also if k is negative.

Examples

			Square array A(n,k) begins:
  1,  1,  1,   1,   1,    1,    1,    1,     1, ...
  0,  1,  2,   3,   4,    5,    6,    7,     8, ...
  1,  2,  4,   7,  11,   16,   22,   29,    37, ...
  1,  3,  7,  14,  25,   41,   63,   92,   129, ...
  2,  5, 12,  26,  51,   92,  155,  247,   376, ...
  2,  7, 19,  45,  96,  188,  343,  590,   966, ...
  4, 11, 30,  75, 171,  359,  702, 1292,  2258, ...
  4, 15, 45, 120, 291,  650, 1352, 2644,  4902, ...
  7, 22, 67, 187, 478, 1128, 2480, 5124, 10026, ...
		

Crossrefs

Rows n=0-4 give: A000012, A001477, A000124, A004006(k+1), A027927(k+3).
Main diagonal gives A292463.
A(n,n+1) gives A292613.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, add(
          (numtheory[sigma](j)+k-1)*A(n-j, k), j=1..n)/n)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..14);
    # second Maple program:
    A:= proc(n, k) option remember; `if`(n=0, 1, `if`(k<1,
          A(n, k+1)-A(n-1, k+1), `if`(k=1, combinat[numbpart](n),
          A(n-1, k)+A(n, k-1))))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..14);
    # third Maple program:
    b:= proc(n, i, k) option remember; `if`(n=0 or i<2,
          binomial(k+n-1, n), add(b(n-i*j, i-1, k), j=0..n/i))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i < 2, Binomial[k + n - 1, n], Sum[b[n - i*j, i - 1, k], {j, 0, n/i}]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d - n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 17 2018, translated from 3rd Maple program *)

Formula

G.f. of column k: 1/(1-x)^k * 1/Product_{j>1} (1-x^j).
Column k is Euler transform of k,1,1,1,... .
For fixed k>=0, A(n,k) ~ 2^((k-5)/2) * 3^((k-2)/2) * n^((k-3)/2) * exp(Pi*sqrt(2*n/3)) / Pi^(k-1). - Vaclav Kotesovec, Oct 24 2018

A292622 Number A(n,k) of partitions of n with up to k distinct kinds of 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 2, 1, 4, 4, 3, 3, 2, 1, 5, 7, 5, 5, 4, 4, 1, 6, 11, 9, 8, 7, 6, 4, 1, 7, 16, 16, 13, 12, 10, 8, 7, 1, 8, 22, 27, 22, 20, 17, 14, 11, 8, 1, 9, 29, 43, 38, 33, 29, 24, 19, 15, 12, 1, 10, 37, 65, 65, 55, 49, 41, 33, 26, 20, 14
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 2017

Keywords

Comments

For fixed k>=0, A(n,k) ~ Pi * 2^(k - 5/2) * exp(Pi*sqrt(2*n/3)) / (3 * n^(3/2)). - Vaclav Kotesovec, Oct 24 2018

Examples

			A(3,4) =  9: 3, 21a, 21b, 21c, 21d, 1a1b1c, 1a1b1d, 1a1c1d, 1b1c1d.
A(4,3) =  8: 4, 31a, 31b, 31c, 22, 21a1b, 21a1c, 21b1c.
A(4,4) = 13: 4, 31a, 31b, 31c, 31d, 22, 21a1b, 21a1c, 21a1d, 21b1c, 21b1d, 21c1d, 1a1b1c1d.
Square array A(n,k) begins:
  1,  1,  1,  1,  1,  1,   1,   1,   1, ...
  0,  1,  2,  3,  4,  5,   6,   7,   8, ...
  1,  1,  2,  4,  7, 11,  16,  22,  29, ...
  1,  2,  3,  5,  9, 16,  27,  43,  65, ...
  2,  3,  5,  8, 13, 22,  38,  65, 108, ...
  2,  4,  7, 12, 20, 33,  55,  93, 158, ...
  4,  6, 10, 17, 29, 49,  82, 137, 230, ...
  4,  8, 14, 24, 41, 70, 119, 201, 338, ...
  7, 11, 19, 33, 57, 98, 168, 287, 488, ...
		

Crossrefs

Rows n=0-4 give: A000012, A001477, A000124(k-1) for k>0, A011826 for k>0.
Main diagonal gives A292507.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or i=1,
          binomial(k, n), `if`(i>n, 0, b(n-i, i, k))+b(n, i-1, k))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i == 1, Binomial[k, n], If[i > n, 0, b[n - i, i, k]] + b[n, i - 1, k]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d - n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 19 2018, after Alois P. Heinz *)

Formula

G.f. of column k: (1 + x)^k * Product_{j>=2} 1 / (1 - x^j). - Ilya Gutkovskiy, Apr 24 2021

A292745 Number A(n,k) of partitions of n with k sorts of part 1 which are introduced in ascending order; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 2, 1, 1, 3, 6, 5, 2, 1, 1, 3, 7, 13, 7, 4, 1, 1, 3, 7, 19, 26, 11, 4, 1, 1, 3, 7, 20, 52, 54, 15, 7, 1, 1, 3, 7, 20, 62, 151, 108, 22, 8, 1, 1, 3, 7, 20, 63, 217, 442, 219, 30, 12, 1, 1, 3, 7, 20, 63, 232, 803, 1314, 439, 42, 14
Offset: 0

Views

Author

Alois P. Heinz, Sep 22 2017

Keywords

Examples

			A(3,2) = 6: 3, 21a, 1a1a1a, 1a1a1b, 1a1b1a, 1a1b1b.
Square array A(n,k) begins:
  1,  1,   1,    1,    1,    1,    1,    1,    1, ...
  0,  1,   1,    1,    1,    1,    1,    1,    1, ...
  1,  2,   3,    3,    3,    3,    3,    3,    3, ...
  1,  3,   6,    7,    7,    7,    7,    7,    7, ...
  2,  5,  13,   19,   20,   20,   20,   20,   20, ...
  2,  7,  26,   52,   62,   63,   63,   63,   63, ...
  4, 11,  54,  151,  217,  232,  233,  233,  233, ...
  4, 15, 108,  442,  803,  944,  965,  966,  966, ...
  7, 22, 219, 1314, 3092, 4158, 4425, 4453, 4454, ...
		

Crossrefs

Main diagonal gives A292503.

Programs

  • Maple
    f:= (n, k)-> add(Stirling2(n, j), j=0..k):
    b:= proc(n, i, k) option remember; `if`(n=0 or i<2,
          f(n, k), add(b(n-i*j, i-1, k), j=0..n/i))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    f[n_, k_] := Sum[StirlingS2[n, j], {j, 0, k}];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i < 2, f[n, k], Sum[b[n - i*j, i - 1, k], {j, 0, n/i}]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d - n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 17 2018, translated from Maple *)

Formula

A(n,k) = Sum_{j=0..k} A292746(n,j).
A(n,k) = A(n,n) for all k >= n.

A292746 Triangle read by rows: T(n,k) (n>=0, 0<=k<=n) = number of partitions of n with exactly k kinds of 1's which are introduced in ascending order.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 3, 1, 2, 3, 8, 6, 1, 2, 5, 19, 26, 10, 1, 4, 7, 43, 97, 66, 15, 1, 4, 11, 93, 334, 361, 141, 21, 1, 7, 15, 197, 1095, 1778, 1066, 267, 28, 1, 8, 22, 409, 3482, 8207, 7108, 2668, 463, 36, 1, 12, 30, 840, 10855, 36310, 43747, 23116, 5909, 751, 45, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 22 2017

Keywords

Examples

			T(3,0) = 1: 3.
T(3,1) = 2: 21a, 1a1a1a.
T(3,2) = 3: 1a1a1b, 1a1b1a, 1a1b1b. (The two kinds of 1's are labeled 1a and 1b)
T(3,3) = 1: 1a1b1c.
Triangle T(n,k) begins:
  1;
  0,  1;
  1,  1,   1;
  1,  2,   3,    1;
  2,  3,   8,    6,    1;
  2,  5,  19,   26,   10,    1;
  4,  7,  43,   97,   66,   15,    1;
  4, 11,  93,  334,  361,  141,   21,   1;
  7, 15, 197, 1095, 1778, 1066,  267,  28,  1;
  8, 22, 409, 3482, 8207, 7108, 2668, 463, 36, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A002865, A000041(n-1) for n>0, A259401(n-2) for n>1, A320816, A320817, A320818, A320819, A320820, A320821, A320822, A320823.
Main diagonal and first lower diagonal give: A000012, A000217.
Row sums give A292503.
T(2n,n) gives A292747.

Programs

  • Maple
    f:= (n, k)-> add(Stirling2(n, j), j=0..k):
    b:= proc(n, i, k) option remember; `if`(n=0 or i<2,
          f(n, k), add(b(n-i*j, i-1, k), j=0..n/i))
        end:
    T:= (n, k)-> b(n$2, k)-`if`(k=0, 0, b(n$2, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..14);
    # second Maple program:
    b:= proc(n, i, k) option remember; `if`(n=0 or i<2,
          k^n, b(n, i-1, k) +b(n-i, min(i, n-i), k))
        end:
    T:= (n, k)-> add((-1)^i*b(n$2, k-i)/((k-i)!*i!), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    f[n_, k_] := Sum[StirlingS2[n, j], {j, 0, k}];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i < 2, f[n, k], Sum[b[n - i*j, i - 1, k], {j, 0, n/i}]];
    T[n_, k_] := b[n, n, k] - If[k == 0, 0, b[n, n, k - 1]];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 17 2018, translated from Maple *)

Formula

T(n,k) = A292745(n,k) - A292745(n,k-1) for k>0. T(n,0) = A292745(n,0) = A002865(n).
T(n,k) = Sum_{i=0..k} (-1)^i * A292741(n, k-i) / ((k-i)!*i!).

Extensions

Definition clarified by N. J. A. Sloane, Dec 12 2020

A292462 Number of partitions of n with n sorts of part 1.

Original entry on oeis.org

1, 1, 5, 31, 278, 3287, 48256, 843567, 17081639, 392869430, 10112244792, 287927207846, 8984122319997, 304828239096197, 11173376516829974, 439988449921648076, 18523908107054523591, 830292183207722271065, 39475390430795389762048, 1984220622132901208082220
Offset: 0

Views

Author

Alois P. Heinz, Sep 16 2017

Keywords

Examples

			a(2) = 5: 2, 1a1a, 1a1b, 1b1a, 1b1b.
		

Crossrefs

Main diagonal of A292741.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or i=1, k^n,
          `if`(i>n, 0, b(n-i, i, k))+b(n, i-1, k))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=0..23);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i == 1, k^n, If[i > n, 0, b[n - i, i, k]] + b[n, i - 1, k]];
    a[0] = 1; a[n_] := b[n, n, n];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, May 19 2018, translated from Maple *)

Formula

a(n) = [x^n] 1/(1-n*x) * Product_{j=2..n} 1/(1-x^j).
a(n) ~ n^n * (1 + 1/n^2 + 1/n^3 + 2/n^4 + 2/n^5 + 4/n^6 + 4/n^7 + 7/n^8 + 8/n^9 + 12/n^10), for coefficients see A002865. - Vaclav Kotesovec, Sep 19 2017
a(n) = Sum_{j=0..n} A002865(j) * n^(n-j). - Alois P. Heinz, Sep 22 2017

A090764 Number of partitions of n with two sorts of part 1.

Original entry on oeis.org

1, 2, 5, 11, 24, 50, 104, 212, 431, 870, 1752, 3518, 7057, 14138, 28310, 56661, 113377, 226820, 453728, 907561, 1815259, 3630683, 7261576, 14523405, 29047130, 58094643, 116189764, 232380102, 464760912, 929522671, 1859046381, 3718094000, 7436189507, 14872380808
Offset: 0

Views

Author

Jon Perry, Feb 01 2004

Keywords

Comments

Original name was: a(n) = Sum_{pi = partition of n} 2^{number of 1's in pi}.
a(n) is the number of compositions of n consisting of two kinds of parts, p and p', when the order of all the primed parts does not matter; or equivalently, when the order of all the unprimed parts does not matter. - Gregory L. Simay, Sep 12 2017

Examples

			a(4) = 24 because the partitions of 4 are 4(1), 31(2), 22(1), 211(4) and 1111(16). 1+2+1+4+16=24.
a(4) = 24 because the compositions of 4 (when the parts are of two kinds, p and p', and the order of the primed parts does not matter) are 4; 4'; 3,1; 1,3; 3',1 = 1,3'; 3,1' = 1',3; 3'1' = 1'3'; 2,2; 2'2 = 2,2'; 2',2'; 2,1,1; 1,2,1; 1,1,2; 2,1,1'= 2,1',1 = 1',2,1; 2',1,1 = 1,2',1 = 1,1,2'; 2,1',1' = 1',2,1' = 1',1',2; 2',1',1 = 2',1,1'= 1,2',1' = 1',2',1 = 1',1,2' = 1,1',2'; 2',1',1' = 1',2',1' = 1',1',2'; 1,1,1,1; 1',1,1,1 = 1,1',1,1 = 1,1,1',1 = 1,1,1,1'; 1',1',1,1 = 1,1',1,1' = 1',1,1',1 = 1',1,1,1' = 1,1'1',1 = 1,1,1',1'; 1',1',1',1 = 1',1',1,1' = 1',1,1',1', 1,1',1',1'; 1',1',1',1'. - _Gregory L. Simay_, Sep 12 2017
a(4) = 24 because the convolution of the first 5 partition numbers with the first 5 composition numbers is 1*8 + 1*4 + 2*2 + 3*1 + 5*1 = 24. (Note that the first partition number is A000041(0)=1; and the first composition number is A011782(0)=1.) - _Gregory L. Simay_, Sep 15 2017
a(4) = 2*a(3) + A000041(4) - A000041(3) = 2*11 + 5 - 3 = 24. - _Gregory L. Simay_, Sep 16 2017
		

Crossrefs

Column k=2 of A292741.

Programs

  • Java
    import java.math.*; import java.io.*; public class A090764 { public static final int LIMIT = 80; public static final BigInteger TWO = new BigInteger("2"); public static void main(String[] args) throws Exception {BigInteger[] a = new BigInteger[LIMIT];
    int i, j; PrintStream out = new PrintStream(new FileOutputStream("A090764.txt")); a[0] = BigInteger.ONE;for (i = 1; i < LIMIT; i++)a[i] = a[i - 1].multiply(TWO); for (j = 2; j < LIMIT; j++)for (i = j; i < LIMIT; i++)
    a[i] = a[i - 1].multiply(TWO); for (j = 2; j < LIMIT; j++)for (i = j; i < LIMIT; i++) a[i] = a[i].add(a[i - j]);for (i = 0; i < LIMIT; i++)out.print(a[i] + " ");out.print(" ");}} // David Wasserman, Feb 10 2004
  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i<2, 2^n,
          add(b(n-i*j, i-1), j=0..iquo(n, i)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 19 2013
  • Mathematica
    c[n_] := Count[n, 1]; f[n_] := Apply[Plus, 2^Map[ c, IntegerPartitions[n] ]]; Table[ f[n], {n, 0, 31}] (* Robert G. Wilson v, Feb 12 2004 *)
    b[n_, i_] := b[n, i] = If[n == 0 || i < 2, 2^n, Sum[b[n - i*j, i - 1], {j, 0, Quotient[n, i]}]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)
    Table[PartitionsP[n] + Sum[2^(k-1)*PartitionsP[n-k], {k, 1, n}], {n, 0, 50}] (* Vaclav Kotesovec, Apr 10 2017 *)

Formula

G.f.: (1/(1-2*x))*Product_{m>=2} 1/(1-x^m). - Vladeta Jovovic, Feb 04 2004
Convolution of A000041 with A011782. In general, Sum_{pi = partition of n} k^{number of 1's in pi} is equal to the convolution of the partitions of n with the compositions of n having parts of (k-1) kinds; this is k=2. - Gregory L. Simay, Sep 15 2017
a(n) = 2*a(n-1) + A000041(n) - A000041(n-1). - Gregory L. Simay, Sep 16 2017
a(n) ~ c * 2^n, where c = Product_{n>=2} (2^n/(2^n-1)) = 1.7313733097275318... - Vaclav Kotesovec, Sep 17 2017

Extensions

More terms from David Wasserman, Feb 10 2004
a(0) inserted by Alois P. Heinz, Feb 19 2013
New name from Alois P. Heinz, Sep 21 2017
Showing 1-6 of 6 results.