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.

A323718 Array read by antidiagonals upwards where A(n,k) is the number of k-times partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 5, 6, 4, 1, 1, 1, 7, 15, 10, 5, 1, 1, 1, 11, 28, 34, 15, 6, 1, 1, 1, 15, 66, 80, 65, 21, 7, 1, 1, 1, 22, 122, 254, 185, 111, 28, 8, 1, 1, 1, 30, 266, 604, 739, 371, 175, 36, 9, 1, 1, 1, 42, 503, 1785, 2163, 1785, 672, 260, 45, 10, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jan 25 2019

Keywords

Comments

A k-times partition of n for k > 1 is a sequence of (k-1)-times partitions, one of each part in an integer partition of n. A 1-times partition of n is just an integer partition of n, and the only 0-times partition of n is the number n itself.

Examples

			Array begins:
       k=0:   k=1:   k=2:   k=3:   k=4:   k=5:
  n=0:  1      1      1      1      1      1
  n=1:  1      1      1      1      1      1
  n=2:  1      2      3      4      5      6
  n=3:  1      3      6     10     15     21
  n=4:  1      5     15     34     65    111
  n=5:  1      7     28     80    185    371
  n=6:  1     11     66    254    739   1785
  n=7:  1     15    122    604   2163   6223
  n=8:  1     22    266   1785   8120  28413
  n=9:  1     30    503   4370  24446 101534
The A(4,2) = 15 twice-partitions:
  (4)  (31)    (22)    (211)      (1111)
       (3)(1)  (2)(2)  (11)(2)    (11)(11)
                       (2)(11)    (111)(1)
                       (21)(1)    (11)(1)(1)
                       (2)(1)(1)  (1)(1)(1)(1)
		

Crossrefs

Columns: A000012 (k=0), A000041 (k=1), A063834 (k=2), A301595 (k=3).
Rows: A000027 (n=2), A000217 (n=3), A006003 (n=4).
Main diagonal gives A306187.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or k=0 or i=1,
          1, b(n, i-1, k)+b(i$2, k-1)*b(n-i, min(n-i, i), k))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(d-k, k), k=0..d), d=0..14);  # Alois P. Heinz, Jan 25 2019
  • Mathematica
    ptnlev[n_,k_]:=Switch[k,0,{n},1,IntegerPartitions[n],_,Join@@Table[Tuples[ptnlev[#,k-1]&/@ptn],{ptn,IntegerPartitions[n]}]];
    Table[Length[ptnlev[sum-k,k]],{sum,0,12},{k,0,sum}]
    (* Second program: *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || k == 0 || i == 1, 1,
         b[n, i - 1, k] + b[i, i, k - 1]*b[n - i, Min[n - i, i], k]];
    A[n_, k_] := b[n, n, k];
    Table[Table[A[d - k, k], {k, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, May 13 2021, after Alois P. Heinz *)

Formula

Column k is the formal power product transform of column k-1, where the formal power product transform of a sequence q with offset 1 is the sequence whose ordinary generating function is Product_{n >= 1} 1/(1 - q(n) * x^n).
A(n,k) = Sum_{i=0..k} binomial(k,i) * A327639(n,i). - Alois P. Heinz, Sep 20 2019

A327631 Number T(n,k) of parts in all proper k-times partitions of n; triangle T(n,k), n >= 1, 0 <= k <= n-1, read by rows.

Original entry on oeis.org

1, 1, 2, 1, 5, 3, 1, 11, 21, 12, 1, 19, 61, 74, 30, 1, 34, 205, 461, 432, 144, 1, 53, 474, 1652, 2671, 2030, 588, 1, 85, 1246, 6795, 17487, 23133, 15262, 3984, 1, 127, 2723, 20966, 76264, 148134, 158452, 88194, 19980, 1, 191, 6277, 69812, 360114, 1002835, 1606434, 1483181, 734272, 151080
Offset: 1

Views

Author

Alois P. Heinz, Sep 19 2019

Keywords

Comments

In each step at least one part is replaced by the partition of itself into smaller parts. The parts are not resorted.
T(n,k) is defined for all n>=0 and k>=0. The triangle displays only positive terms. All other terms are zero.
Row n is the inverse binomial transform of the n-th row of array A327618.

Examples

			T(4,0) = 1:
  4    (1 part).
T(4,1) = 11 = 2 + 2 + 3 + 4:
  4-> 31    (2 parts)
  4-> 22    (2 parts)
  4-> 211   (3 parts)
  4-> 1111  (4 parts)
T(4,2) = 21 = 3 + 4 + 3 + 3 + 4 + 4:
  4-> 31 -> 211   (3 parts)
  4-> 31 -> 1111  (4 parts)
  4-> 22 -> 112   (3 parts)
  4-> 22 -> 211   (3 parts)
  4-> 22 -> 1111  (4 parts)
  4-> 211-> 1111  (4 parts)
T(4,3) = 12 = 4 + 4 + 4:
  4-> 31 -> 211 -> 1111  (4 parts)
  4-> 22 -> 112 -> 1111  (4 parts)
  4-> 22 -> 211 -> 1111  (4 parts)
Triangle T(n,k) begins:
  1;
  1,   2;
  1,   5,    3;
  1,  11,   21,    12;
  1,  19,   61,    74,    30;
  1,  34,  205,   461,   432,    144;
  1,  53,  474,  1652,  2671,   2030,    588;
  1,  85, 1246,  6795, 17487,  23133,  15262,  3984;
  1, 127, 2723, 20966, 76264, 148134, 158452, 88194, 19980;
  ...
		

Crossrefs

Columns k=0-2 give: A057427, -1+A006128(n), A328042.
Row sums give A327648.
T(n,floor(n/2)) gives A328041.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, [1, 0],
         `if`(k=0, [1, 1], `if`(i<2, 0, b(n, i-1, k))+
             (h-> (f-> f +[0, f[1]*h[2]/h[1]])(h[1]*
            b(n-i, min(n-i, i), k)))(b(i$2, k-1))))
        end:
    T:= (n, k)-> add(b(n$2, i)[2]*(-1)^(k-i)*binomial(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n-1), n=1..12);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, {1, 0}, If[k == 0, {1, 1}, If[i < 2, 0, b[n, i - 1, k]] + Function[h, Function[f, f + {0, f[[1]]*h[[2]]/ h[[1]]}][h[[1]]*b[n - i, Min[n - i, i], k]]][b[i, i, k - 1]]]];
    T[n_, k_] := Sum[b[n, n, i][[2]]*(-1)^(k - i)*Binomial[k, i], {i, 0, k}];
    Table[T[n, k], {n, 1, 12}, {k, 0, n - 1}] // Flatten (* Jean-François Alcover, Jan 07 2020, after Alois P. Heinz *)

Formula

T(n,k) = Sum_{i=0..k} (-1)^(k-i) * binomial(k,i) * A327618(n,i).
T(n,n-1) = n * A327639(n,n-1) = n * A327643(n) for n >= 1.

A327622 Number A(n,k) of parts in all k-times partitions of n into distinct parts; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 3, 1, 0, 1, 1, 5, 3, 1, 0, 1, 1, 7, 8, 5, 1, 0, 1, 1, 9, 16, 15, 8, 1, 0, 1, 1, 11, 27, 35, 28, 10, 1, 0, 1, 1, 13, 41, 69, 73, 49, 13, 1, 0, 1, 1, 15, 58, 121, 160, 170, 86, 18, 1, 0, 1, 1, 17, 78, 195, 311, 460, 357, 156, 25, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 19 2019

Keywords

Comments

Row n is binomial transform of the n-th row of triangle A327632.

Examples

			Square array A(n,k) begins:
  0,  0,  0,   0,    0,    0,    0,     0,     0, ...
  1,  1,  1,   1,    1,    1,    1,     1,     1, ...
  1,  1,  1,   1,    1,    1,    1,     1,     1, ...
  1,  3,  5,   7,    9,   11,   13,    15,    17, ...
  1,  3,  8,  16,   27,   41,   58,    78,   101, ...
  1,  5, 15,  35,   69,  121,  195,   295,   425, ...
  1,  8, 28,  73,  160,  311,  553,   918,  1443, ...
  1, 10, 49, 170,  460, 1047, 2106,  3865,  6611, ...
  1, 13, 86, 357, 1119, 2893, 6507, 13182, 24625, ...
		

Crossrefs

Columns k=0-3 give: A057427, A015723, A327605, A327628.
Rows n=0,(1+2),3-5 give: A000004, A000012, A005408, A104249, A005894.
Main diagonal gives: A327623.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, [1, 0],
         `if`(k=0, [1, 1], `if`(i*(i+1)/2 (f-> f +[0, f[1]*h[2]/h[1]])(h[1]*
            b(n-i, min(n-i, i-1), k)))(b(i$2, k-1)))))
        end:
    A:= (n, k)-> b(n$2, k)[2]:
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = With[{}, If[n==0, Return@{1, 0}]; If[k == 0, Return@{1, 1}]; If[i(i + 1)/2 < n, Return@{0, 0}]; b[n, i - 1, k] + Function[h, Function[f, f + {0, f[[1]] h[[2]]/h[[1]]}][h[[1]] b[n - i, Min[n - i, i - 1], k]]][b[i, i, k - 1]]];
    A[n_, k_] := b[n, n, k][[2]];
    Table[A[n, d - n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jun 03 2020, after Maple *)

Formula

A(n,k) = Sum_{i=0..k} binomial(k,i) * A327632(n,i).

A327594 Number of parts in all twice partitions of n.

Original entry on oeis.org

0, 1, 5, 14, 44, 100, 274, 581, 1417, 2978, 6660, 13510, 29479, 58087, 120478, 236850, 476913, 916940, 1812498, 3437043, 6657656, 12512273, 23780682, 44194499, 83117200, 152837210, 283431014, 517571202, 949844843, 1719175176, 3127751062, 5618969956, 10133425489
Offset: 0

Views

Author

Alois P. Heinz, Sep 18 2019

Keywords

Examples

			a(2) = 5 = 1+2+2 counting the parts in 2, 11, 1|1.
a(3) = 14 = 1+2+3+2+3+3: 3, 21, 111, 2|1, 11|1, 1|1|1.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember; (p-> [p(n), add(p(n-j)*
          numtheory[tau](j), j=1..n)])(combinat[numbpart])
        end:
    b:= proc(n, i) option remember; `if`(n=0, [1, 0],
          `if`(i<2, 0, b(n, i-1)) +(h-> (f-> f +[0, f[1]*
           h[2]/h[1]])(b(n-i, min(n-i, i))*h[1]))(g(i)))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..37);
    # second Maple program:
    b:= proc(n, i, k) option remember; `if`(n=0, [1, 0],
         `if`(k=0, [1, 1], `if`(i<2, 0, b(n, i-1, k))+
             (h-> (f-> f +[0, f[1]*h[2]/h[1]])(h[1]*
            b(n-i, min(n-i, i), k)))(b(i$2, k-1))))
        end:
    a:= n-> b(n$2, 2)[2]:
    seq(a(n), n=0..37);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, {1, 0}, If[k == 0, {1, 1}, If[i < 2, 0, b[n, i - 1, k]] + Function[h, Function[f, f + {0, f[[1]] h[[2]]/ h[[1]]}][h[[1]] b[n - i, Min[n - i, i], k]]][b[i, i, k - 1]]]];
    a[n_] := b[n, n, 2][[2]];
    a /@ Range[0, 37] (* Jean-François Alcover, Dec 05 2020, after Alois P. Heinz *)

A327619 Number of parts in all n-times partitions of n.

Original entry on oeis.org

0, 1, 5, 25, 219, 1596, 19844, 208377, 3394835, 46799236, 886886076, 15668835975, 366602236558, 7582277939549, 199035634246870, 4962275379320665, 150339081311823341, 4214812414260868163, 141823733752997729872, 4533014863242019822308, 169587948261109794026999
Offset: 0

Views

Author

Alois P. Heinz, Sep 19 2019

Keywords

Examples

			a(2) = 5: 2, 11, 1|1.
		

Crossrefs

Main diagonal of A327618.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, [1, 0],
         `if`(k=0, [1, 1], `if`(i<2, 0, b(n, i-1, k))+
             (h-> (f-> f +[0, f[1]*h[2]/h[1]])(h[1]*
            b(n-i, min(n-i, i), k)))(b(i$2, k-1))))
        end:
    a:= n-> b(n$3)[2]:
    seq(a(n), n=0..21);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, {1, 0}, If[k == 0, {1, 1}, If[i < 2, 0, b[n, i - 1, k]] + Function[h, Function[f, f + {0, f[[1]] h[[2]]/ h[[1]]}][h[[1]] b[n - i, Min[n - i, i], k]]][b[i, i, k - 1]]]];
    a[n_] := b[n, n, n][[2]];
    a /@ Range[0, 21] (* Jean-François Alcover, May 01 2020, after Maple *)

A327627 Number of parts in all thrice partitions of n.

Original entry on oeis.org

0, 1, 7, 25, 109, 315, 1179, 3234, 10789, 29517, 89217, 238422, 708782, 1838147, 5158957, 13489966, 36783238, 94122716, 252156677, 638254389, 1674465026, 4215683662, 10834938301, 27032106456, 68911496918, 170196098655, 427274190051, 1051046411165, 2612004809769
Offset: 0

Views

Author

Alois P. Heinz, Sep 19 2019

Keywords

Crossrefs

Column k=3 of A327618.
Cf. A327628.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, [1, 0],
         `if`(k=0, [1, 1], `if`(i<2, 0, b(n, i-1, k))+
             (h-> (f-> f +[0, f[1]*h[2]/h[1]])(h[1]*
            b(n-i, min(n-i, i), k)))(b(i$2, k-1))))
        end:
    a:= n-> b(n$2, 3)[2]:
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, {1, 0}, If[k == 0, {1, 1}, If[i < 2, 0, b[n, i - 1, k]] + Function[h, Function[f, f + {0, f[[1]] h[[2]]/ h[[1]]}][h[[1]] b[n - i, Min[n - i, i], k]]][b[i, i, k - 1]]]];
    a[n_] := b[n, n, 3][[2]];
    a /@ Range[0, 30] (* Jean-François Alcover, Dec 10 2020, after Alois P. Heinz *)
Showing 1-6 of 6 results.