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

A346517 Number A(n,k) of partitions of the (n+k)-multiset {1,2,...,n,1,2,...,k} into distinct multisets; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 5, 3, 3, 5, 15, 9, 5, 9, 15, 52, 31, 18, 18, 31, 52, 203, 120, 70, 40, 70, 120, 203, 877, 514, 299, 172, 172, 299, 514, 877, 4140, 2407, 1393, 801, 457, 801, 1393, 2407, 4140, 21147, 12205, 7023, 4025, 2295, 2295, 4025, 7023, 12205, 21147
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2021

Keywords

Comments

Also number A(n,k) of factorizations of Product_{i=1..n} prime(i) * Product_{i=1..k} prime(i) into distinct factors; A(2,2) = 5: 2*3*6, 4*9, 3*12, 2*18, 36.

Examples

			A(2,2) = 5: 1122, 11|22, 1|122, 112|2, 1|12|2.
Square array A(n,k) begins:
    1,    1,    2,     5,    15,     52,    203,     877, ...
    1,    1,    3,     9,    31,    120,    514,    2407, ...
    2,    3,    5,    18,    70,    299,   1393,    7023, ...
    5,    9,   18,    40,   172,    801,   4025,   21709, ...
   15,   31,   70,   172,   457,   2295,  12347,   70843, ...
   52,  120,  299,   801,  2295,   6995,  40043,  243235, ...
  203,  514, 1393,  4025, 12347,  40043, 136771,  875936, ...
  877, 2407, 7023, 21709, 70843, 243235, 875936, 3299218, ...
  ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000110, A087648, A322773, A322774, A346897, A346898, A346899, A346900, A346901, A346902, A346903.
Main diagonal gives A094574.
First upper (or lower) diagonal gives A322771.
Second upper (or lower) diagonal gives A322772.
Antidiagonal sums give A346518.

Programs

  • Maple
    g:= proc(n, k) option remember; uses numtheory; `if`(n>k, 0, 1)+
         `if`(isprime(n), 0, add(`if`(d>k or max(factorset(n/d))>d, 0,
            g(n/d, d-1)), d=divisors(n) minus {1, n}))
        end:
    p:= proc(n) option remember; `if`(n=0, 1, p(n-1)*ithprime(n)) end:
    A:= (n, k)-> g(p(n)*p(k)$2):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    A:= proc(n, k) option remember; `if`(n
    				
  • Mathematica
    (* Q is A322770 *)
    Q[m_, n_] := Q[m, n] = If[n == 0, BellB[m], (1/2)(Q[m+2, n-1] + Q[m+1, n-1] - Sum[Binomial[n-1, k] Q[m, k], {k, 0, n-1}])];
    A[n_, k_] := Q[Abs[n-k], Min[n, k]];
    Table[A[n, d-n], {d, 0, 10}, {n, 0, d}] // Flatten (* Jean-François Alcover, Aug 19 2021 *)

Formula

A(n,k) = A045778(A002110(n)*A002110(k)).
A(n,k) = A(k,n).
A(n,k) = A322770(abs(n-k),min(n,k)).

A322770 Array read by upwards antidiagonals: T(m,n) = number of set partitions into distinct parts of the multiset consisting of one copy each of x_1, x_2, ..., x_m, and two copies each of y_1, y_2, ..., y_n, for m >= 0, n >= 0.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 5, 9, 18, 40, 15, 31, 70, 172, 457, 52, 120, 299, 801, 2295, 6995, 203, 514, 1393, 4025, 12347, 40043, 136771, 877, 2407, 7023, 21709, 70843, 243235, 875936, 3299218, 4140, 12205, 38043, 124997, 431636, 1562071, 5908978, 23308546, 95668354
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

Examples

			The array begins:
     1,    1,     5,     40,      457,      6995,      136771, ...
     1,    3,    18,    172,     2295,     40043,      875936, ...
     2,    9,    70,    801,    12347,    243235,     5908978, ...
     5,   31,   299,   4025,    70843,   1562071,    41862462, ...
    15,  120,  1393,  21709,   431636,  10569612,   310606617, ...
    52,  514,  7023, 124997,  2781372,  75114998,  2407527172, ...
   203, 2407, 38043, 764538, 18885177, 559057663, 19449364539, ...
   ...
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778. (Background information.)

Crossrefs

Rows include A094574, A322771, A322772.
Columns include A000110, A087648, A322773, A322774.
Main diagonal is A322775.

Programs

  • Maple
    B := n -> combinat[bell](n):
    Q := proc(m,n) local k; global B; option remember;
    if n = 0 then B(m)  else
    (1/2)*( Q(m+2,n-1) + Q(m+1,n-1) - add( binomial(n-1,k)*Q(m,k), k=0..n-1) ); fi; end;  # Q(m,n) (which is Knuth's notation) is T(m,n)
  • Mathematica
    Q[m_, n_] := Q[m, n] = If[n == 0, BellB[m], (1/2)(Q[m+2, n-1] + Q[m+1, n-1] - Sum[Binomial[n-1, k] Q[m, k], {k, 0, n-1}])];
    Table[Q[m-n, n], {m, 0, 8}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jan 02 2019, from Maple *)

Formula

Knuth gives a recurrence using the Bell numbers A000110 (see Maple program).
Showing 1-2 of 2 results.