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-7 of 7 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

A327643 Number of refinement sequences n -> ... -> {1}^n, where in each step one part is replaced by a partition of itself into two smaller parts (in weakly decreasing order).

Original entry on oeis.org

1, 1, 1, 3, 6, 24, 84, 498, 2220, 15108, 92328, 773580, 5636460, 53563476, 471562512, 5270698716, 52117937052, 637276396764, 7317811499736, 100453675122444, 1276319138168796, 19048874583061716, 270233458572751440, 4442429353548965628, 68384217440167826412
Offset: 1

Views

Author

Alois P. Heinz, Sep 20 2019

Keywords

Comments

Number of proper (n-1)-times partitions of n, cf. A327639.
Might be called "Half-Factorial numbers" analog to the "Half-Catalan numbers" (A000992).
The recursion formula is a special case of the formula given in A327729.
a(n+1)/(n*a(n)) tends to 0.67617164... - Vaclav Kotesovec, Apr 28 2020

Examples

			a(1) = 1:
  1
a(2) = 1:
  2 -> 11
a(3) = 1:
  3 -> 21 -> 111
a(4) = 3:
  4 -> 31 -> 211 -> 1111
  4 -> 22 -> 112 -> 1111
  4 -> 22 -> 211 -> 1111
a(5) = 6:
  5 -> 41 -> 311 -> 2111 -> 11111
  5 -> 41 -> 221 -> 1121 -> 11111
  5 -> 41 -> 221 -> 2111 -> 11111
  5 -> 32 -> 212 -> 1112 -> 11111
  5 -> 32 -> 212 -> 2111 -> 11111
  5 -> 32 -> 311 -> 2111 -> 11111
		

Crossrefs

Cf. A000142, A000992, A002846 (only one part of each size is replaceable), A327631, A327639, A327697, A327698, A327699, A327702, A327729.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or k=0, 1, `if`(i>1,
          b(n, i-1, k), 0) +b(i$2, k-1)*b(n-i, min(n-i, i), k))
        end:
    a:= n-> add(b(n$2, i)*(-1)^(n-1-i)*binomial(n-1, i), i=0..n-1):
    seq(a(n), n=1..29);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=1, 1,
          add(a(j)*a(n-j)*binomial(n-2, j-1), j=1..n/2))
        end:
    seq(a(n), n=1..29);
  • Mathematica
    a[n_] := a[n] = Sum[Binomial[n-2, j-1] a[j] a[n-j], {j, n/2}]; a[1] = 1;
    Array[a, 25] (* Jean-François Alcover, Apr 28 2020 *)

Formula

a(n) = Sum_{j=1..floor(n/2)} C(n-2,j-1) a(j)*a(n-j) for n > 1, a(1) = 1.
a(n) = A327639(n,n-1) = A327631(n,n-1)/n.

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.

A327769 Number of proper twice partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 6, 15, 45, 93, 223, 444, 944, 1802, 3721, 6898, 13530, 25150, 48047, 87702, 165173, 298670, 553292, 995698, 1815981, 3242921, 5872289, 10406853, 18630716, 32879716, 58391915, 102371974, 180622850, 314943742, 551841083, 958011541, 1667894139
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2019

Keywords

Examples

			a(3) = 1:
  3 -> 21 -> 111
a(4) = 6:
  4 -> 31 -> 211
  4 -> 31 -> 1111
  4 -> 22 -> 112
  4 -> 22 -> 211
  4 -> 22 -> 1111
  4 -> 211-> 1111
		

Crossrefs

Column k=2 of A327639.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or k=0, 1, `if`(i>1,
          b(n, i-1, k), 0) +b(i$2, k-1)*b(n-i, min(n-i, i), k))
        end:
    a:= n-> (k-> add(b(n$2, i)*(-1)^(k-i)*binomial(k, i), i=0..k))(2):
    seq(a(n), n=0..37);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || k == 0, 1, If[i > 1, b[n, i - 1, k], 0] + b[i, i, k - 1] b[n - i, Min[n - i, i], k]];
    a[n_] := Sum[b[n, n, i] (-1)^(2 - i) Binomial[2, i], {i, 0, 2}];
    a /@ Range[0, 37] (* Jean-François Alcover, May 01 2020, after Maple *)

Formula

From Vaclav Kotesovec, May 27 2020: (Start)
a(n) ~ c * 5^(n/4), where
c = 96146522937.7161... if mod(n,4) = 0
c = 96146521894.9433... if mod(n,4) = 1
c = 96146522937.2138... if mod(n,4) = 2
c = 96146521894.8218... if mod(n,4) = 3
(End)

A327644 Number of proper many times partitions of n.

Original entry on oeis.org

1, 1, 2, 4, 14, 44, 244, 1196, 9366, 62296, 584016, 5120548, 60244028, 627389924, 8378159376, 106097674780, 1652301306958, 23655318730276, 409987534384504, 6742903763089068, 130675390985884516, 2396246933608687036, 50636625943991790784, 1032841246318579471748
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 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.

Examples

			a(3) = 4: 3, 3->21, 3->111, 3->21->111.
a(4) = 14: 4, 4->31, 4->22, 4->211, 4->1111, 4->31->211, 4->31->1111, 4->22->112, 4->22->211, 4->22->1111, 4->211->1111, 4->31->211->1111, 4->22->112->1111, 4->22->211->1111.
		

Crossrefs

Row sums of A327639.
Cf. A327648.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or k=0, 1, `if`(i>1,
          b(n, i-1, k), 0) +b(i$2, k-1)*b(n-i, min(n-i, i), k))
        end:
    a:= n-> add(add(b(n$2, i)*(-1)^(k-i)*
            binomial(k, i), i=0..k), k=0..max(0, n-1)):
    seq(a(n), n=0..23);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || k == 0, 1, If[i > 1, b[n, i - 1, k], 0] + b[i, i, k - 1] b[n - i, Min[n - i, i], k]];
    a[n_] := Sum[b[n, n, i] (-1)^(k - i) Binomial[k, i], {k, 0, Max[0, n - 1]}, {i, 0, k}];
    a /@ Range[0, 23] (* Jean-François Alcover, Dec 09 2020, after Alois P. Heinz *)

A327645 Number of proper n-times partitions of 2n.

Original entry on oeis.org

1, 1, 6, 88, 2489, 112669, 8204101, 799422247, 109633217402, 19157475773052, 4260985739868007, 1161511740640164091, 388990633971649889649, 152369510393132343133762, 70914541309488196549283707, 38152280583855500772704976704, 23639325145221113389859164367779
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 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.

Examples

			a(2) = 6: 4->31->211, 4->31->1111, 4->22->112, 4->22->211, 4->22->1111, 4->211->1111.
		

Crossrefs

Cf. A327639.

Programs

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

Formula

a(n) = A327639(2n,n).

A327646 Total number of steps in all proper many times partitions of n.

Original entry on oeis.org

0, 0, 1, 4, 25, 108, 788, 4740, 44445, 339632, 3625136, 35508536, 462626736, 5273725108, 76634997096, 1047347436984, 17542238923677, 268193251446228, 4949536256552648, 86303019303031400, 1768833677916545596, 34165810747993948664, 759192269597947084836
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 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.

Examples

			a(3) = 4 = 0+1+1+2, counting steps "->" in: 3, 3->21, 3->111, 3->21->111.
a(4) = 25: 4, 4->31, 4->22, 4->211, 4->1111, 4->31->211, 4->31->1111, 4->22->112, 4->22->211, 4->22->1111, 4->211->1111, 4->31->211->1111, 4->22->112->1111, 4->22->211->1111.
		

Crossrefs

Cf. A327639.

Programs

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

Formula

a(n) = Sum_{k=1..n-1} k * A327639(n,k).
Showing 1-7 of 7 results.