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-10 of 14 results. Next

A005651 Sum of multinomial coefficients (n_1+n_2+...)!/(n_1!*n_2!*...) where (n_1, n_2, ...) runs over all integer partitions of n.

Original entry on oeis.org

1, 1, 3, 10, 47, 246, 1602, 11481, 95503, 871030, 8879558, 98329551, 1191578522, 15543026747, 218668538441, 3285749117475, 52700813279423, 896697825211142, 16160442591627990, 307183340680888755, 6147451460222703502, 129125045333789172825, 2841626597871149750951
Offset: 0

Views

Author

Keywords

Comments

This is the total number of hierarchies of n labeled elements arranged on 1 to n levels. A distribution of elements onto levels is "hierarchical" if a level l+1 contains <= elements than level l. Thus for n=4 the arrangement {1,2}:{3}{4} is not allowed. See also A140585. Examples: Let the colon ":" separate two consecutive levels l and l+1. Then n=2 --> 3: {1}{2}, {1}:{2}, {2}:{1}, n=3 --> 10: {1}{2}{3}, {1}{2}:{3}, {3}{1}:{2}, {2}{3}:{1}, {1}:{2}:{3}, {3}:{1}:{2}, {2}:{3}:{1}, {1}:{3}:{2}, {2}:{1}:{3}, {3}:{2}:{1}. - Thomas Wieder, May 17 2008
n identical objects are painted by dipping them into a long row of cans of paint of distinct colors. Begining with the first can and not skipping any cans k, 1<=k<=n, objects are dipped (painted) and not more objects are dipped into any subsequent can than were dipped into the previous can. The painted objects are then linearly ordered. - Geoffrey Critzer, Jun 08 2009
a(n) is the number of partitions of n where each part i is marked with a word of length i over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the partition. a(3) = 10: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a. - Alois P. Heinz, Aug 30 2015
Also the number of ordered set partitions of {1,...,n} with weakly decreasing block sizes. - Gus Wiseman, Sep 03 2018
The parity of a(n) is that of A000110(A000120(n)), so a(n) is even if and only if A000120(n) == 2 (mod 3). - Álvar Ibeas, Aug 11 2020

Examples

			For n=3, say the first three cans in the row contain red, white, and blue paint respectively. The objects can be painted r,r,r or r,r,w or r,w,b and then linearly ordered in 1 + 3 + 6 = 10 ways. - _Geoffrey Critzer_, Jun 08 2009
From _Gus Wiseman_, Sep 03 2018: (Start)
The a(3) = 10 ordered set partitions with weakly decreasing block sizes:
  {{1},{2},{3}}
  {{1},{3},{2}}
  {{2},{1},{3}}
  {{2},{3},{1}}
  {{3},{1},{2}}
  {{3},{2},{1}}
  {{2,3},{1}}
  {{1,2},{3}}
  {{1,3},{2}}
  {{1,2,3}}
(End)
		

References

  • Abramowitz and Stegun, Handbook, p. 831, column labeled "M_1".
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 126.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Main diagonal of: A226873, A261719, A309973.
Row sums of: A226874, A262071, A327803.
Column k=1 of A309951.
Column k=0 of A327801.

Programs

  • Maple
    A005651b := proc(k) add( d/(d!)^(k/d),d=numtheory[divisors](k)) ; end proc:
    A005651 := proc(n) option remember; local k ; if n <= 1 then 1; else (n-1)!*add(A005651b(k)*procname(n-k)/(n-k)!, k=1..n) ; end if; end proc:
    seq(A005651(k), k=0..10) ; # R. J. Mathar, Jan 03 2011
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, n!,
          b(n, i-1) +binomial(n, i)*b(n-i, min(n-i, i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Aug 29 2015, Dec 12 2016
  • Mathematica
    Table[Total[n!/Map[Function[n, Apply[Times, n! ]], IntegerPartitions[n]]], {n, 0, 20}] (* Geoffrey Critzer, Jun 08 2009 *)
    Table[Total[Apply[Multinomial, IntegerPartitions[n], {1}]], {n, 0, 20}] (* Jean-François Alcover and Olivier Gérard, Sep 11 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[t==1, 1/n!, Sum[b[n-j, j, t-1]/j!, {j, i, n/t}]]; a[n_] := If[n==0, 1, n!*b[n, 0, n]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 20 2015, after Alois P. Heinz *)
  • Maxima
    a(m,n):=if n=m then 1 else sum(binomial(n,k)*a(k,n-k),k,m,(n/2))+1;
    makelist(a(1,n),n,0,17); /* Vladimir Kruchinin, Sep 06 2014 */
    
  • PARI
    a(n)=my(N=n!,s);forpart(x=n,s+=N/prod(i=1,#x,x[i]!));s \\ Charles R Greathouse IV, May 01 2015
    
  • PARI
    { my(n=25); Vec(serlaplace(prod(k=1, n, 1/(1-x^k/k!) + O(x*x^n)))) } \\ Andrew Howroyd, Dec 20 2017

Formula

E.g.f.: 1 / Product (1 - x^k/k!).
a(n) = Sum_{k=1..n} (n-1)!/(n-k)!*b(k)*a(n-k), where b(k) = Sum_{d divides k} d*d!^(-k/d). - Vladeta Jovovic, Oct 14 2002
a(n) ~ c * n!, where c = Product_{k>=2} 1/(1-1/k!) = A247551 = 2.52947747207915264... . - Vaclav Kotesovec, May 09 2014
a(n) = S(n,1), where S(n,m) = sum(k=m..n/2 , binomial(n,k)*S(n-k,k))+1, S(n,n)=1, S(n,m)=0 for nVladimir Kruchinin, Sep 06 2014
E.g.f.: exp(Sum_{k>=1} Sum_{j>=1} x^(j*k)/(k*(j!)^k)). - Ilya Gutkovskiy, Jun 18 2018

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003

A007837 Number of partitions of n-set with distinct block sizes.

Original entry on oeis.org

1, 1, 1, 4, 5, 16, 82, 169, 541, 2272, 17966, 44419, 201830, 802751, 4897453, 52275409, 166257661, 840363296, 4321172134, 24358246735, 183351656650, 2762567051857, 10112898715063, 62269802986835, 343651382271526, 2352104168848091, 15649414071734847
Offset: 0

Views

Author

Keywords

Comments

Conjecture: the Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k. Cf. A185895. - Peter Bala, Mar 17 2022

Examples

			From _Gus Wiseman_, Jul 13 2019: (Start)
The a(1) = 1 through a(5) = 16 set partitions with distinct block sizes:
  {{1}}  {{1,2}}  {{1,2,3}}    {{1,2,3,4}}    {{1,2,3,4,5}}
                  {{1},{2,3}}  {{1},{2,3,4}}  {{1},{2,3,4,5}}
                  {{1,2},{3}}  {{1,2,3},{4}}  {{1,2},{3,4,5}}
                  {{1,3},{2}}  {{1,2,4},{3}}  {{1,2,3},{4,5}}
                               {{1,3,4},{2}}  {{1,2,3,4},{5}}
                                              {{1,2,3,5},{4}}
                                              {{1,2,4},{3,5}}
                                              {{1,2,4,5},{3}}
                                              {{1,2,5},{3,4}}
                                              {{1,3},{2,4,5}}
                                              {{1,3,4},{2,5}}
                                              {{1,3,4,5},{2}}
                                              {{1,3,5},{2,4}}
                                              {{1,4},{2,3,5}}
                                              {{1,4,5},{2,3}}
                                              {{1,5},{2,3,4}}
(End)
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(add((-d)*(-d!)^(-k/d),
           d=numtheory[divisors](k))*(n-1)!/(n-k)!*a(n-k), k=1..n))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 06 2008
    # second Maple program:
    A007837 := proc(n) option remember; local k; `if`(n = 0, 1,
    add(binomial(n-1, k-1) * A182927(k) * A007837(n-k), k = 1..n)) end:
    seq(A007837(i),i=0..24); # Peter Luschny, Apr 25 2011
  • Mathematica
    nn=20;p=Product[1+x^i/i!,{i,1,nn}];Drop[Range[0,nn]!CoefficientList[ Series[p,{x,0,nn}],x],1]  (* Geoffrey Critzer, Sep 22 2012 *)
    a[0]=1; a[n_] := a[n] = Sum[(n-1)!/(n-k)!*DivisorSum[k, -#*(-#!)^(-k/#)&]* a[n-k], {k, 1, n}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 23 2015, after Vladeta Jovovic *)
  • PARI
    {my(n=20); Vec(serlaplace(prod(k=1, n, (1+x^k/k!) + O(x*x^n))))} \\ Andrew Howroyd, Dec 21 2017

Formula

E.g.f.: Product_{m >= 1} (1+x^m/m!).
a(n) = Sum_{k=1..n} (n-1)!/(n-k)!*b(k)*a(n-k), where b(k) = Sum_{d divides k} (-d)*(-d!)^(-k/d) and a(0) = 1. - Vladeta Jovovic, Oct 13 2002
E.g.f.: exp(Sum_{k>=1} Sum_{j>=1} (-1)^(k+1)*x^(j*k)/(k*(j!)^k)). - Ilya Gutkovskiy, Jun 18 2018

Extensions

More terms from Christian G. Bower
a(0)=1 prepended by Alois P. Heinz, Aug 29 2015

A326616 Number T(n,k) of colored integer partitions of n using all colors of a k-set such that each block of part i with multiplicity j has a pattern of i*j distinct colors in increasing order; triangle T(n,k), n>=0, A185283(n)<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 2, 2, 5, 1, 9, 13, 9, 44, 42, 10, 96, 225, 150, 9, 152, 680, 1098, 576, 3, 155, 1350, 4155, 5201, 2266, 124, 2180, 11730, 26642, 26904, 9966, 140, 3751, 30300, 106281, 182000, 149832, 47466, 160, 6050, 69042, 348061, 896392, 1229760, 855240, 237019
Offset: 0

Views

Author

Alois P. Heinz, Sep 12 2019

Keywords

Comments

T(n,k) is defined for all n>=0 and k>=0. The triangle displays only positive terms. All other terms are zero.

Examples

			T(3,2) = 2: 2a1b, 2b1a.
T(3,3) = 5: 3abc, 2ab1c, 2ac1b, 2bc1a, 111abc
Triangle T(n,k) begins:
  1;
     1;
        2;
        2,  5;
        1,  9,  13;
            9,  44,   42;
           10,  96,  225,   150;
            9, 152,  680,  1098,    576;
            3, 155, 1350,  4155,   5201,   2266;
               124, 2180, 11730,  26642,  26904,   9966;
               140, 3751, 30300, 106281, 182000, 149832, 47466;
               ...
		

Crossrefs

Main diagonal gives A178682.
Row sums give A326648.
Column sums give A326650.
Cf. A000203, A185283, A326617 (this triangle read by columns), A326649, A326651.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 0, numtheory[sigma](n)+g(n-1)) end:
    h:= proc(n) option remember; local k; for k from
          `if`(n=0, 0, h(n-1)) do if g(k)>=n then return k fi od
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add((t->
          b(n-t, min(n-t, i-1), k)*binomial(k, t))(i*j), j=0..n/i)))
        end:
    T:= (n, k)-> add(b(n$2, k-i)*(-1)^i*binomial(k, i), i=0..k):
    seq(seq(T(n, k), k=h(n)..n), n=0..12);
  • Mathematica
    g[n_] := g[n] = If[n == 0, 0, DivisorSigma[1, n] + g[n - 1]];
    h[n_] := h[n] = Module[{k}, For[k = If[n == 0, 0, h[n - 1]], True, k++,  If[g[k] >= n, Return[k]]]];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[Function[t,   b[n - t, Min[n - t, i - 1], k]*Binomial[k, t]][i*j], {j, 0, n/i}]]];
    T[n_, k_] := Sum[b[n, n, k - i]*(-1)^i*Binomial[k, i], {i, 0, k}];
    Table[Table[T[n, k], {k, h[n], n}], {n, 0, 12}]  // Flatten (* Jean-François Alcover, Feb 27 2021, after Alois P. Heinz *)

Formula

Sum_{k=A185283(n)..n} k * T(n,k) = A326649(n).
Sum_{n=k..A024916(k)} n * T(n,k) = A326651(k).

A326617 Number T(n,k) of colored integer partitions of n using all colors of a k-set such that each block of part i with multiplicity j has a pattern of i*j distinct colors in increasing order; triangle T(n,k), k>=0, k<=n<=A024916(k), read by columns.

Original entry on oeis.org

1, 1, 2, 2, 1, 5, 9, 9, 10, 9, 3, 13, 44, 96, 152, 155, 124, 140, 160, 113, 48, 16, 4, 42, 225, 680, 1350, 2180, 3751, 6050, 7420, 6870, 5555, 5330, 6300, 6475, 5025, 3000, 1250, 250, 150, 1098, 4155, 11730, 30300, 69042, 127364, 188568, 249690, 365160, 584733
Offset: 0

Views

Author

Alois P. Heinz, Sep 12 2019

Keywords

Comments

T(n,k) is defined for all n>=0 and k>=0. The triangle displays only positive terms. All other terms are zero.

Examples

			T(3,2) = 2: 2a1b, 2b1a.
T(3,3) = 5: 3abc, 2ab1c, 2ac1b, 2bc1a, 111abc.
Triangle T(n,k) begins:
  1;
     1;
        2;
        2,  5;
        1,  9,  13;
            9,  44,   42;
           10,  96,  225,   150;
            9, 152,  680,  1098,    576;
            3, 155, 1350,  4155,   5201,   2266;
               124, 2180, 11730,  26642,  26904,   9966;
               140, 3751, 30300, 106281, 182000, 149832, 47466;
               ...
		

Crossrefs

Main diagonal gives A178682.
Row sums give A326648.
Column sums give A326650.
Cf. A000203, A024916, A326616 (this triangle read by rows), A326649, A326651.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 0, numtheory[sigma](n)+g(n-1)) end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add((t->
          b(n-t, min(n-t, i-1), k)*binomial(k, t))(i*j), j=0..n/i)))
        end:
    T:= (n, k)-> add(b(n$2, k-i)*(-1)^i*binomial(k, i), i=0..k):
    seq(seq(T(n, k), n=k..g(k)), k=0..6);
  • Mathematica
    g[n_] := g[n] = If[n == 0, 0, DivisorSigma[1, n] + g[n - 1]] ;
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[With[{t = i j}, b[n - t, Min[n - t, i - 1], k]*Binomial[k, t]], {j, 0, n/i}]]];
    T[n_, k_] := Sum[b[n, n, k - i]*(-1)^i*Binomial[k, i], {i, 0, k}];
    Table[Table[T[n, k], {n, k, g[k]}], {k, 0, 6}] // Flatten (* Jean-François Alcover, Mar 12 2021, after Alois P. Heinz *)

Formula

Sum_{k=A185283(n)..n} k * T(n,k) = A326649(n).
Sum_{n=k..A024916(k)} n * T(n,k) = A326651(k).

A334370 Expansion of e.g.f. Product_{k>=1} (1 + x^prime(k) / prime(k)!).

Original entry on oeis.org

1, 0, 1, 1, 0, 11, 0, 22, 56, 36, 2640, 1, 8712, 79, 72436, 360465, 48608, 49008961, 794376, 4232764, 7753140, 942565890, 18198334, 14799637777, 10577976, 366619314900, 2785137222400, 1475339135400, 1065920156634060, 3765722000041, 5869315258699050
Offset: 0

Views

Author

Ilya Gutkovskiy, May 11 2020

Keywords

Comments

a(n) is the number of functions f:[n]-> [n] such that the number of elements that are mapped to i is either 0 or the i-th prime. a(5) = 11: (33333), (11222), (12122), (12212), (12221), (21122), (21212), (21221), (22112), (22121), (22211). - Alois P. Heinz, Jul 18 2023

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+
          (p-> `if`(p>n, 0, b(n-p, i-1)*binomial(n, p)))(ithprime(i))))
        end:
    a:= n-> b(n, numtheory[pi](n)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 18 2023
  • Mathematica
    nmax = 30; CoefficientList[Series[Product[(1 + x^Prime[k]/Prime[k]!), {k, 1, nmax}], {x, 0, nmax}], x] Range[0, nmax]!
    a[n_] := a[n] = If[n == 0, 1, (n - 1)! Sum[DivisorSum[k, -#/(-#!)^(k/#) &, PrimeQ[#] &] a[n - k]/(n - k)!, {k, 1, n}]]; Table[a[n], {n, 0, 30}]
  • PARI
    my(N=40, x='x+O('x^N)); Vec(serlaplace(prod(k=1, N, 1+isprime(k)*x^k/k!))) \\ Seiichi Manyama, Feb 27 2022

A326500 Number T(n,k) of colored integer partitions of n using all colors of a k-set such that each block of part i with multiplicity j has a pattern of i*j colors in (weakly) increasing order; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 3, 8, 5, 0, 5, 22, 30, 13, 0, 7, 54, 129, 124, 42, 0, 11, 118, 428, 696, 525, 150, 0, 15, 248, 1293, 3108, 3830, 2358, 576, 0, 22, 490, 3483, 11595, 20720, 20535, 10661, 2266, 0, 30, 950, 9102, 40592, 99140, 141234, 117362, 52824, 9966
Offset: 0

Views

Author

Alois P. Heinz, Sep 12 2019

Keywords

Examples

			T(3,1) = 3: 3aaa, 2aa1a, 111aaa.
T(3,2) = 8: 3aab, 3abb, 2aa1b, 2ab1b, 2ab1a, 2bb1a, 111aab, 111abb.
T(3,3) = 5: 3abc, 2ab1c, 2ac1b, 2bc1a, 111abc.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  2,   2;
  0,  3,   8,    5;
  0,  5,  22,   30,    13;
  0,  7,  54,  129,   124,    42;
  0, 11, 118,  428,   696,   525,    150;
  0, 15, 248, 1293,  3108,  3830,   2358,    576;
  0, 22, 490, 3483, 11595, 20720,  20535,  10661,  2266;
  0, 30, 950, 9102, 40592, 99140, 141234, 117362, 52824, 9966;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A000041 (for n>0).
Main diagonal gives A178682.
Row sums give A326654.
T(2n,n) gives A328158.
Cf. A326656.

Programs

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

Formula

Sum_{k=1..n} k * T(n,k) = A326656(n).

A261774 Number of compositions of n where the (possibly scattered) maximal subsequence of part i with multiplicity j is marked with a word of length i*j over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the composition.

Original entry on oeis.org

1, 1, 2, 8, 29, 117, 696, 4286, 25458, 156843, 1156246, 9521096, 79140828, 665427791, 5610420458, 49509430318, 475540600965, 4831978977077, 51175720976994, 552595605354707, 5923618798039611, 63654533191518745, 705094561770919436, 8127236135685948103
Offset: 0

Views

Author

Alois P. Heinz, Aug 31 2015

Keywords

Examples

			a(3) = 8: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c.
		

Crossrefs

Cf. A000670 (parts are marked individually), A178682 (same for partitions), A261777, A327677.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j)/j!*binomial(n, i*j), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, i - 1, p + j]/j!*Binomial[n, i*j], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 17 2018, translated from Maple *)

A364285 Number T(n,k) of partitions of n with largest part k where each block of part i with multiplicity j is marked with a word of length i*j over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the partition; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 7, 4, 1, 0, 1, 15, 20, 5, 1, 0, 1, 31, 81, 30, 6, 1, 0, 1, 63, 287, 175, 42, 7, 1, 0, 1, 127, 952, 841, 280, 56, 8, 1, 0, 1, 255, 3025, 4545, 1638, 420, 72, 9, 1, 0, 1, 511, 9370, 23820, 10333, 2730, 600, 90, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 17 2023

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=n. T(n,k) = 0 for k>n.
T(n,k) is also the number of endofunctions on [n] such that k is the range maximum and the number of elements that are mapped to m is divisible by m.
T(4,2) = 7: (2211), (2121), (2112), (1221), (1212), (1122), (2222).
T(5,3) = 20: (33322), (33232), (33223), (32332), (32323), (32233), (23332), (23323), (23233), (22333), (33311), (33131), (33113), (31331), (31313), (31133), (13331), (13313), (13133), (11333).

Examples

			T(4,1) = 1: 1111abcd.
T(4,2) = 7: 2ab11cd, 2ac11bd, 2ad11bc, 2bc11ad, 2bd11ac, 2cd11ab, 22abcd.
T(4,3) = 4: 3abc1d, 3abd1c, 3acd1b, 3bcd1a.
T(4,4) = 1: 4abcd.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   3,    1;
  0, 1,   7,    4,    1;
  0, 1,  15,   20,    5,    1;
  0, 1,  31,   81,   30,    6,   1;
  0, 1,  63,  287,  175,   42,   7,  1;
  0, 1, 127,  952,  841,  280,  56,  8, 1;
  0, 1, 255, 3025, 4545, 1638, 420, 72, 9, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A000225(n-1).
Row sums give A178682.
T(2n,n) gives A364322.
Cf. A364310.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*binomial(n, i*j), j=0..n/i)))
        end:
    T:= (n, k)-> b(n, k)-`if`(k=0, 0, b(n, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..12);

A364310 Number T(n,k) of partitions of n into k parts where each block of part i with multiplicity j is marked with a word of length i*j over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the partition; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 5, 6, 1, 0, 1, 15, 15, 10, 1, 0, 1, 22, 76, 35, 15, 1, 0, 1, 63, 168, 252, 70, 21, 1, 0, 1, 93, 574, 785, 658, 126, 28, 1, 0, 1, 255, 2188, 3066, 2739, 1470, 210, 36, 1, 0, 1, 386, 5490, 18235, 12181, 7857, 2940, 330, 45, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 18 2023

Keywords

Examples

			T(4,1) = 1: 4abcd.
T(4,2) = 5: 3abc1d, 3abd1c, 3acd1b, 3bcd1a, 22abcd.
T(4,3) = 6: 2ab11cd, 2ac11bd, 2ad11bc, 2bc11ad, 2bd11ac, 2cd11ab.
T(4,4) = 1: 1111abcd.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   3,    1;
  0, 1,   5,    6,    1;
  0, 1,  15,   15,   10,    1;
  0, 1,  22,   76,   35,   15,    1;
  0, 1,  63,  168,  252,   70,   21,   1;
  0, 1,  93,  574,  785,  658,  126,  28,  1;
  0, 1, 255, 2188, 3066, 2739, 1470, 210, 36, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A057427.
Row sums give A178682.
T(n,n) gives A000012.
T(n+1,n) gives A000217.
T(n+2,n) gives A000332(n+3).
Cf. A364285.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*x^j*binomial(n, i*j), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0,
       Sum[b[n - i*j, i - 1]*x^j*Binomial[n, i*j], {j, 0, n/i}]]]];
    T[n_] := CoefficientList[b[n, n], x];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Nov 18 2023, after Alois P. Heinz *)

A364344 Number of endofunctions on [n] such that the number of elements that are mapped to i is a multiple or a divisor of i.

Original entry on oeis.org

1, 1, 4, 20, 177, 1462, 21919, 254802, 4816788, 82401465, 1929926410, 35256890748, 1152938630784, 24977973856643, 823036511854847, 24332827884557037, 954801492779273665, 27023410818058291822, 1309814517293654535339, 41375530521928893861920
Offset: 0

Views

Author

Alois P. Heinz, Jul 19 2023

Keywords

Examples

			a(0) = 1: ().
a(1) = 1: (1).
a(2) = 2: (11), (12), (21), (22).
a(3) = 20 (111), (112), (113), (121), (122), (123), (131), (132), (211), (212), (213), (221), (223), (231), (232), (311), (312), (321), (322), (333).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*binomial(n, i*j), j=0..n/i)+add(
         `if`(d>n or d=i, 0, b(n-d, i-1)*binomial(n, d)),
              d=numtheory[divisors](i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..19);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[b[n - i*j, i - 1]* Binomial[n, i*j], {j, 0, n/i}]+Sum[If[d>n || d == i, 0, b[n - d, i - 1]* Binomial[n, d]], {d, Divisors[i]}]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Oct 27 2023, after Alois P. Heinz *)
Showing 1-10 of 14 results. Next