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

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

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 4, 4, 5, 15, 11, 9, 11, 15, 52, 36, 26, 26, 36, 52, 203, 135, 92, 66, 92, 135, 203, 877, 566, 371, 249, 249, 371, 566, 877, 4140, 2610, 1663, 1075, 712, 1075, 1663, 2610, 4140, 21147, 13082, 8155, 5133, 3274, 3274, 5133, 8155, 13082, 21147
Offset: 0

Views

Author

Alois P. Heinz, Jul 20 2021

Keywords

Comments

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

Examples

			A(2,2) = 9: 1122, 11|22, 12|12, 1|122, 112|2, 11|2|2, 1|1|22, 1|12|2, 1|1|2|2.
Square array A(n,k) begins:
    1,    1,    2,     5,    15,     52,     203,     877, ...
    1,    2,    4,    11,    36,    135,     566,    2610, ...
    2,    4,    9,    26,    92,    371,    1663,    8155, ...
    5,   11,   26,    66,   249,   1075,    5133,   26683, ...
   15,   36,   92,   249,   712,   3274,   16601,   91226, ...
   52,  135,  371,  1075,  3274,  10457,   56135,  325269, ...
  203,  566, 1663,  5133, 16601,  56135,  198091, 1207433, ...
  877, 2610, 8155, 26683, 91226, 325269, 1207433, 4659138, ...
  ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000110, A035098, A322764, A322768, A346881, A346882, A346883, A346884, A346885, A346886, A346887.
Main diagonal gives A020555.
First upper (or lower) diagonal gives A322766.
Second upper (or lower) diagonal gives A322767.
Antidiagonal sums give A346490.
A(2n,n) gives A322769.

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)), 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
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n-j] Binomial[n-1, j-1], {j, 1, n}]];
    A[n_, k_] := A[n, k] = If[n < k, A[k, n],
         If[k == 0, b[n], (A[n + 1, k - 1] + Sum[A[n - k + j, j]*
         Binomial[k - 1, j], {j, 0, k - 1}] + A[n, k - 1])/2]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Aug 18 2021, after Alois P. Heinz's second program *)

Formula

A(n,k) = A001055(A002110(n)*A002110(k)).
A(n,k) = A(k,n).
A(n,k) = A322765(abs(n-k),min(n,k)).

A322765 Array read by upwards antidiagonals: T(m,n) = number of set partitions 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, 2, 2, 4, 9, 5, 11, 26, 66, 15, 36, 92, 249, 712, 52, 135, 371, 1075, 3274, 10457, 203, 566, 1663, 5133, 16601, 56135, 198091, 877, 2610, 8155, 26683, 91226, 325269, 1207433, 4659138, 4140, 13082, 43263, 149410, 537813, 2014321, 7837862, 31638625, 132315780
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

Examples

			The array begins:
    1,    2,     9,     66,      712,     10457,      198091, ...
    1,    4,    26,    249,     3274,     56135,     1207433, ...
    2,   11,    92,   1075,    16601,    325269,     7837862, ...
    5,   36,   371,   5133,    91226,   2014321,    53840640, ...
   15,  135,  1663,  26683,   537813,  13241402,   389498179, ...
   52,  566,  8155, 149410,  3376696,  91914202,  2955909119, ...
  203, 2610, 43263, 894124, 22451030, 670867539, 23456071495, ...
  ...
		

References

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

Crossrefs

Rows include A020555, A322766, A322767.
Columns include A000110, A035098, A322764, A322768.
Main diagonal is A322769.
See A322770 for partitions into distinct parts.

Programs

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

Formula

Knuth p. 779 gives a recurrence using the Bell numbers A000110 (see Maple program).
From Alois P. Heinz, Jul 21 2021: (Start)
A(n,k) = A001055(A002110(n+k)*A002110(k)).
A(n,k) = A346500(n+k,k). (End)

A322774 Column 3 of array in A322770.

Original entry on oeis.org

40, 172, 801, 4025, 21709, 124997, 764538, 4945866, 33710579, 241273791, 1807949285, 14146621349, 115316563400, 977216138500, 8592652709041, 78263082518169, 737228862573509, 7172071557558805, 71964172085006666, 743866850349092130, 7912230538914051723
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

Crossrefs

Column k=3 of A346517.
Showing 1-3 of 3 results.