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

A261280 Number of ways to start with set {1,2,...,n} and then repeat n times: partition each set into subsets.

Original entry on oeis.org

1, 1, 3, 22, 315, 7556, 274778, 14140722, 979687005, 87998832685, 9951699489061, 1384060090903535, 232230523534594676, 46265730933522733556, 10797461309089628151462, 2918087323005280354349508, 904185772556792011572372117, 318432010852077710049833537040
Offset: 0

Views

Author

Alois P. Heinz, Aug 14 2015

Keywords

Examples

			a(2) = 3: 12->12->12, 12->12->1|2, 12->1|2->1|2.
a(3) = 22: 123->123->123->123, 123->123->123->12|3, 123->123->123->1|23, 123->123->123->13|2, 123->123->123->1|2|3, 123->123->12|3->12|3, 123->123->12|3->1|2|3, 123->123->1|23->1|23, 123->123->1|23->1|2|3, 123->123->13|2->13|2, 123->123->13|2->1|2|3, 123->123->1|2|3->1|2|3, 123->12|3->12|3->12|3, 123->12|3->12|3->1|2|3, 123->12|3->1|2|3->1|2|3, 123->1|23->1|23->1|23, 123->1|23->1|23->1|2|3, 123->1|23->1|2|3->1|2|3, 123->13|2->13|2->13|2, 123->13|2->13|2->1|2|3, 123->13|2->1|2|3->1|2|3, 123->1|2|3->1|2|3->1|2|3.
		

Crossrefs

Main diagonal of A144150.

Programs

  • Maple
    g:= x-> exp(x)-1:
    egf:= k-> 1+(g@@(k+1))(x):
    a:= n-> n! * coeff(series(egf(n), x, n+1), x, n):
    seq(a(n), n=0..20);
    # second Maple program:
    A:= proc(n, k) option remember; `if`(n=0 or k=0, 1,
          add(binomial(n-1, j-1)*A(j, k-1)*A(n-j, k), j=1..n))
        end:
    a:= n-> A(n$2):
    seq(a(n), n=0..20);
    # third Maple program:
    b:= proc(n, t, m) option remember; `if`(t=0, 1, `if`(n=0,
          b(m, t-1, 0), m*b(n-1, t, m)+b(n-1, t, m+1)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 04 2021
  • Mathematica
    Clear[t]; t[n_, k_]:=t[n, k] = If[n==0 || k==0, 1, Sum[Binomial[n-1, j-1]*t[j, k-1]*t[n-j, k], {j, 1, n}]]; Table[t[n, n], {n, 0, 20}] (* Vaclav Kotesovec, Aug 14 2015 after Alois P. Heinz *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def A(n, k): return 1 if n==0 or k==0 else sum(binomial(n - 1, j - 1)*A(j, k - 1)*A(n - j, k) for j in range(1, n + 1))
    def a(n): return A(n, n)
    print([a(n) for n in range(21)]) # Indranil Ghosh, Aug 07 2017

Formula

a(n) = n! * [x^n] 1 + g^(k+1)(x), where g(x) = exp(x)-1.
From Vaclav Kotesovec, Aug 14 2015: (Start)
Conjecture: a(n) ~ c * n^(2*n-5/6) / (2^(n-1) * exp(n)), where c = 7.7889...
a(n) ~ exp(1) * A139383(n).
(End)

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 *)

A306188 Number of n-times strict partitions of n.

Original entry on oeis.org

1, 1, 1, 4, 11, 41, 154, 904, 4927, 35398, 234454, 1965976, 16589885, 157974740, 1480736877, 16406078770, 177232251249, 2151696598160, 25726133391191, 346746928400037, 4607758596471426, 67562340652906942, 969200312705046531, 15386051753617360150
Offset: 0

Views

Author

Alois P. Heinz, Jan 27 2019

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(i*(i+1)/2 b(n$3):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[i(i+1)/2 < n, 0, If[n == 0 || k == 0, 1, b[n, i - 1, k] + b[i, i, k - 1] b[n - i, Min[n - i, i - 1], k]]];
    a[n_] := b[n, n, n];
    a /@ Range[0, 25] (* Jean-François Alcover, Dec 08 2020, after Alois P. Heinz *)
Showing 1-4 of 4 results.