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

A226873 Number A(n,k) of n-length words w over a k-ary alphabet {a1,a2,...,ak} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 0, where #(w,x) counts the letters x in word w; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 3, 1, 0, 1, 1, 3, 4, 1, 0, 1, 1, 3, 10, 11, 1, 0, 1, 1, 3, 10, 23, 16, 1, 0, 1, 1, 3, 10, 47, 66, 42, 1, 0, 1, 1, 3, 10, 47, 126, 222, 64, 1, 0, 1, 1, 3, 10, 47, 246, 522, 561, 163, 1, 0, 1, 1, 3, 10, 47, 246, 882, 1821, 1647, 256, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Examples

			A(4,3) = 23: aaaa, aaab, aaba, aabb, aabc, aacb, abaa, abab, abac, abba, abca, acab, acba, baaa, baab, baac, baba, baca, bbaa, bcaa, caab, caba, cbaa.
Square array A(n,k) begins:
  1, 1,  1,   1,    1,    1,    1,     1, ...
  0, 1,  1,   1,    1,    1,    1,     1, ...
  0, 1,  3,   3,    3,    3,    3,     3, ...
  0, 1,  4,  10,   10,   10,   10,    10, ...
  0, 1, 11,  23,   47,   47,   47,    47, ...
  0, 1, 16,  66,  126,  246,  246,   246, ...
  0, 1, 42, 222,  522,  882, 1602,  1602, ...
  0, 1, 64, 561, 1821, 3921, 6441, 11481, ...
		

Crossrefs

Main diagonal gives: A005651.

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    A:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), n!*b(n, 0, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    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_, k_] := If[k == 0, If[n == 0, 1, 0], n!*b[n, 0, k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Maple *)

Formula

A(n,k) = Sum_{i=0..min(n,k)} A226874(n,i).

A131632 Triangle T(n,k) read by rows = number of partitions of n-set into k blocks with distinct sizes, k = 1..A003056(n).

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 15, 1, 21, 60, 1, 63, 105, 1, 92, 448, 1, 255, 2016, 1, 385, 4980, 12600, 1, 1023, 15675, 27720, 1, 1585, 61644, 138600, 1, 4095, 155155, 643500, 1, 6475, 482573, 4408404, 1, 16383, 1733550, 12687675, 37837800, 1, 26332, 4549808, 60780720
Offset: 1

Views

Author

Vladeta Jovovic, Sep 04 2007

Keywords

Comments

Row sums = A007837.
Sum k! * T(n,k) = A032011.
Sum k * T(n,k) = A131623. - Geoffrey Critzer, Aug 30 2012.
T(n,k) is also the number of words w of length n over a k-ary alphabet {a1,a2,...,ak} with #(w,a1) > #(w,a2) > ... > #(w,ak) > 0, where #(w,x) counts the letters x in word w. T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa. - Alois P. Heinz, Jun 21 2013

Examples

			Triangle T(n,k)begins:
  1;
  1;
  1,     3;
  1,     4;
  1,    15;
  1,    21,      60;
  1,    63,     105;
  1,    92,     448;
  1,   255,    2016;
  1,   385,    4980,    12600;
  1,  1023,   15675,    27720;
  1,  1585,   61644,   138600;
  1,  4095,  155155,   643500;
  1,  6475,  482573,  4408404;
  1, 16383, 1733550, 12687675, 37837800;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, v) option remember; `if`(t=1, 1/(n+v)!,
          add(b(n-j, j, t-1, v+1)/(j+v)!, j=i..n/t))
        end:
    T:= (n, k)->`if`(k*(k+1)/2>n, 0, n!*b(n-k*(k+1)/2, 0, k, 1)):
    seq(seq(T(n, k), k=1..floor(sqrt(2+2*n)-1/2)), n=1..20);
    # Alois P. Heinz, Jun 21 2013
    # second Maple program:
    b:= proc(n, i) option remember; `if`(i*(i+1)/2 (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Sep 27 2019
  • Mathematica
    nn=10;p=Product[1+y x^i/i!,{i,1,nn}];Range[0,nn]! CoefficientList[ Series[p,{x,0,nn}],{x,y}]//Grid  (* Geoffrey Critzer, Aug 30 2012 *)

Formula

E.g.f.: Product_{n>=1} (1+y*x^n/n!).
T(A000217(n),n) = A022915(n). - Alois P. Heinz, Jul 03 2018

A285824 Number T(n,k) of ordered set partitions of [n] into k blocks such that equal-sized blocks are ordered with increasing least elements; 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, 6, 1, 0, 1, 11, 18, 1, 0, 1, 30, 75, 40, 1, 0, 1, 52, 420, 350, 75, 1, 0, 1, 126, 1218, 3080, 1225, 126, 1, 0, 1, 219, 4242, 17129, 15750, 3486, 196, 1, 0, 1, 510, 14563, 82488, 152355, 63756, 8526, 288, 1, 0, 1, 896, 42930, 464650, 1049895, 954387, 217560, 18600, 405, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 27 2017

Keywords

Examples

			T(3,1) = 1: 123.
T(3,2) = 6: 1|23, 23|1, 2|13, 13|2, 3|12, 12|3.
T(3,3) = 1: 1|2|3.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   6,    1;
  0, 1,  11,   18,     1;
  0, 1,  30,   75,    40,     1;
  0, 1,  52,  420,   350,    75,    1;
  0, 1, 126, 1218,  3080,  1225,  126,   1;
  0, 1, 219, 4242, 17129, 15750, 3486, 196, 1;
  ...
		

Crossrefs

Main diagonal and first lower diagonal give: A000012, A002411.
Row sums give A120774.
T(2n,n) gives A285926.

Programs

  • Maple
    b:= proc(n, i, p) option remember; expand(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(b(n-i*j, i-1, p+j)*x^j*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):
    seq(T(n), n=0..12);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Expand[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[b[n-i*j, i-1, p+j]*x^j*multinomial[n, Join[{n-i*j}, Table[i, j]]]/ j!^2, {j, 0, n/i}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, n, 0]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Apr 28 2018, after Alois P. Heinz *)

A213940 Triangle with entry a(n,m) giving the number of bracelets of n beads (dihedral D_n symmetry) with n colors available for each bead, but only m distinct fixed colors, say c[1],...,c[m], are present, with m from {1,...,n} and n>=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 3, 1, 3, 6, 6, 12, 1, 7, 20, 26, 30, 60, 1, 8, 40, 93, 150, 180, 360, 1, 18, 106, 424, 633, 1050, 1260, 2520, 1, 22, 304, 1180, 3260, 5040, 8400, 10080, 20160, 1, 46, 731, 4844, 16212, 29244, 45360, 75600, 90720, 181440
Offset: 1

Views

Author

Wolfdieter Lang, Jul 20 2012

Keywords

Comments

This triangle is obtained from the partition array A213939 by summing in row n, for n>=1, all entries related to partitions of n with the same number of parts m.
a(n,m) is the number of bracelets of n beads (dihedral D_n symmetry) corresponding to the representative color multinomials obtained from all partitions of n with m parts by 'exponentiation', hence only m from the available n colors are present. As a representative multinomial of each of the p(n,m)=A008284(n,m) such m-color classes we take the one where the considered m part partition of n, [p[1],...,p[m]], written in nonincreasing order, is distributed as exponents on the color indices like c[1]^p[1]*...*c[m]^p[m]. That is only the first m colors from the n available ones are involved.
See the comments on A212359 for the Abramowitz-Stegun (A-St) order of partitions, and the 'exponentiation' to obtain multisets, used to encode color multinomials, from partitions.
The row sums of this triangle coincide with the ones of array A213939, and they are given by A213943.
Number of n-length bracelets w over a k-ary alphabet {a1,a2,...,ak} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 1, where #(w,x) counts the letters x in word w (bracelet analog of A226874). - Andrew Howroyd, Sep 26 2017

Examples

			n\m  1  2   3    4     5     6     7     8     9     10 ...
1    1
2    1  1
3    1  1   1
4    1  3   2    3
5    1  3   6    6    12
6    1  7  20   26    30    60
7    1  8  40   93   150   180   360
8    1 18 106  424   633  1050  1260  2520
9    1 22 304 1180  3260  5040  8400 10080 20160
10   1 46 731 4844 16212 29244 45360 75600 90720 181440
...
a(5,3) = 2 + 4 = 6, from A213939(5,4) + A213939(5,5), because k(5,3,1) = 4 and p(5,3) = 2.
a(2,1) = 1 because the partition [2] of n=2 with part number m=1 corresponds to the representative color multinomial (here monomial) c[1]^2 = c[1]*c[1], and there is one such representative bracelet. There is another bracelet color monomial in this class of n=2 colors where only m=1 color is active: c[2]*c[2]. See the triangle entry A213941(2,1)=2. The same holds for the necklace case.
a(3,1) = 1 from the color monomial representative c[1]^3. This class has 2 other members: c[2]^3 and c[3]^3. See A213941(3,1)=3. The same holds for the necklace case.
Like in the necklace case one has in general a(n,1)=1 and A213941(n,1) = n from the partition [n] providing the color signature and a representative c[1]^n.
a(3,2) = 1 from the representative color multinomial c[1]^2*c[2] (from the m=2 partition [2,1] of n=3) leading to just one representative bracelet (and necklace) cyclic(112) (when one uses j for color c[j]). The whole class consists of A213941(3,2)=6 bracelets (or necklaces): cyclic(112), cyclic(113), cyclic(221), cyclic(223), cyclic(331) and cyclic(332).
a(3,3) = 1. The representative color multinomial is c[1]*c[2]*c[3] (from the m=3 partition [1,1,1]). There is only one bracelet cyclic(1,2,3) which constitutes already the whole class (A213941(3,3)=1). The necklace cyclic(1,3,2) becomes equivalent under D_3.
a(4,2) = 3 from two representative color multinomials c[1]^3*c[2] and c[1]^2*c[2]^2 (from the two m=2 partitions of n=4: [3,1] and [2,2]). The first one has one representative bracelet, namely cyclic(1112), the second one leads to the two representative bracelets: cyclic(1122) and cyclic(1212). Together these are the 3 bracelets counted by a(4,2). The first color class c[.]^3*c[.] consists of 4*3=12 bracelets, when all 4 colors are used. The second one consists of 2*6=12 bracelets. Together they sum up to the 24 bracelets counted by A213941(4,2). In this example the necklace case does not differ from the bracelet one.
		

Crossrefs

Columns k=2..5 are A213942, A214307, A214309, A214311.
Cf. A213934 (cyclic symmetry).

Programs

  • PARI
    Cyc(v)={my(s=vecsum(v)); sumdiv(gcd(v), d, eulerphi(d)*(s/d)!/prod(i=1, #v, (v[i]/d)!))/s}
    CPal(v)={my(odds=#select(t->t%2,v), s=vecsum(v));  if(odds>2, 0, ((s-odds)/2)!/prod(i=1, #v, (v[i]\2)!))}
    T(n,k)={my(t=0); forpart(p=n, t+=Cyc(Vec(p))+CPal(Vec(p)), [1,n], [k,k]); t/2}
    for(n=1, 10, for(k=1,n, print1(T(n,k), ", ")); print); \\ Andrew Howroyd, Sep 26 2017
    
  • PARI
    \\ faster version; here U is A226874 as vector of polynomials.
    U(n)={Vec(serlaplace(prod(k=1, n, 1/(1-y*x^k/k!) + O(x*x^n))))}
    T(n)={my(t=U(n)); vector(n, n, vector(n, k, ((1/n)*sumdiv(n, d, eulerphi(n/d) * polcoeff(t[d+1], k)) + if(n%2, sum(d=0, (n-1)/2, binomial((n-1)/2, d)*polcoeff(t[d+1], (k-1))), polcoeff(t[n/2+1], k) + sum(d=0, n/2-1, binomial(n/2-1, d)*(2^d + if(d%2, 0, binomial(d, d/2)))*polcoeff(t[n/2-d], k-2))/2))/2))}
    { my(t=T(10)); for(n=1, #t, print(t[n])) } \\ Andrew Howroyd, Dec 22 2017

Formula

a(n,m) = Sum_{j=1..p(n,m)}A213939(n,k(n,m,1)+j-1), with k(n,m,1) the position where in the list of partitions of n in A-St order the first with m parts appears, and p(n,m) is the number of partitions of n with m parts shown in the array A008284. E.g., n=5, m=3: k(5,3,1)=4, p(5,3)=2.

A327803 Sum T(n,k) of multinomials M(n; lambda), where lambda ranges over all partitions of n into parts that form a set of size k; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 7, 3, 0, 31, 16, 0, 121, 125, 0, 831, 711, 60, 0, 5041, 5915, 525, 0, 42911, 46264, 6328, 0, 364561, 438681, 67788, 0, 3742453, 4371085, 753420, 12600, 0, 39916801, 49321745, 8924685, 166320, 0, 486891175, 588219523, 113501784, 2966040
Offset: 0

Views

Author

Alois P. Heinz, Sep 25 2019

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0,       1;
  0,       3;
  0,       7,       3;
  0,      31,      16;
  0,     121,     125;
  0,     831,     711,     60;
  0,    5041,    5915,    525;
  0,   42911,   46264,   6328;
  0,  364561,  438681,  67788;
  0, 3742453, 4371085, 753420, 12600;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A061095, A327826.
Row sums give A005651.
Cf. A000217, A003056, A022915, A131632 (when the parts are distinct), A226874.

Programs

  • Maple
    with(combinat):
    T:= (n, k)-> add(multinomial(add(i, i=l), l[], 0), l=
                 select(x-> nops({x[]})=k, partition(n))):
    seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..14);
    # second Maple program:
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(x^signum(j)*b(n-i*j, i-1)*
          combinat[multinomial](n, n-i*j, i$j), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..14);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[x^Sign[j]*b[n - i*j, i-1]*multinomial[n, Join[{n-i*j}, Table[i, {j}]]], {j, 0, n/i}]]]];
    T[n_] := CoefficientList[b[n, n], x];
    T /@ Range[0, 14] // Flatten (* Jean-François Alcover, May 06 2020, after 2nd Maple program *)

Formula

T(n*(n+1)/2,n) = T(A000217(n),n) = A022915(n).

A226881 Number of n-length binary words w with #(w,0) >= #(w,1) >= 1, where #(w,x) gives the number of digits x in w.

Original entry on oeis.org

0, 0, 2, 3, 10, 15, 41, 63, 162, 255, 637, 1023, 2509, 4095, 9907, 16383, 39202, 65535, 155381, 262143, 616665, 1048575, 2449867, 4194303, 9740685, 16777215, 38754731, 67108863, 154276027, 268435455, 614429671, 1073741823, 2448023842, 4294967295, 9756737701
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Comments

a(n) is the number of nonempty subsets of {1,2,...,n} that contain either more even than odd numbers or the same number of even and odd numbers. For example, for n=5, a(5)=15 and the 15 subsets are {2}, {4}, {1,2}, {1,4}, {2,3}, {2,4}, {2,5}, {3,4}, {4,5}, {1,2,4}, {2,3,4}, {2,4,5}, {1,2,3,4}, {1,2,4,5}, {2,3,4,5}. - Enrique Navarrete, Dec 15 2019

Examples

			a(4) = 10: 0001, 0010, 0011, 0100, 0101, 0110, 1000, 1001, 1010, 1100.
		

Crossrefs

Column k=2 of A226874.
Cf. A027306.

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<4, n*(n-1)*(4-n)/2, (9*(n-1)*(n-4) *a(n-1)
          +(12-32*n+6*n^2) *a(n-2) -36*(n-2)*(n-4) *a(n-3)
          +8*(n-3)*(3*n-10) *a(n-4))/ (n*(3*n-13)))
        end:
    seq(a(n), n=0..40);
  • Mathematica
    Table[Sum[Binomial[n, i], {i, Floor[n/2]}], {n, 0, 30}] (* Wesley Ivan Hurt, Mar 14 2015 *)
  • PARI
    a(n) = sum(i=1, n\2, binomial(n,i)); \\ Michel Marcus, Jul 15 2022

Formula

G.f.: (3*x-1)/(2*(x-1)*(2*x-1)) + 1/(2*sqrt((1+2*x)*(1-2*x))).
a(n) = Sum_{i=1..floor(n/2)} binomial(n,i). - Wesley Ivan Hurt, Mar 14 2015
a(n) = A027306(n)-1 = 2^(n-1)-1+((1+(-1)^n)/4)*binomial(n,n/2). - Alois P. Heinz, Dec 15 2019

A213934 Triangle with entry a(n,m) giving the number of necklaces of n beads (C_N symmetry) with n colors available for each bead, but only m distinct fixed colors, say c[1],...,c[m], are present, with m from {1,...,n} and n>=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 3, 6, 1, 3, 10, 12, 24, 1, 8, 31, 50, 60, 120, 1, 9, 71, 180, 300, 360, 720, 1, 22, 187, 815, 1260, 2100, 2520, 5040, 1, 29, 574, 2324, 6496, 10080, 16800, 20160, 40320, 1, 66, 1373, 9570, 32268, 58464, 90720, 151200, 181440, 362880
Offset: 1

Views

Author

Wolfdieter Lang, Jun 27 2012

Keywords

Comments

This triangle is obtained from the partition array A212359 by summing in the row number n, for n>=1, all entries related to partitions of n with the same number of parts m.
a(n,m) is the number of necklaces of n beads (C_N symmetry) corresponding to the representative color multinomials obtained from all partitions of n with m parts by 'exponentiation', hence only m from the available n colors are present. As a representative multinomial of each of the p(n,m)=A008284(n,m) such m-color classes we take the one where the considered m part partition of n, [p[1],...,p[m]], written in a nonincreasing way, is distributed as exponents over c[1]^p[1]*...*c[m]^p[m]. That is only the first m colors from the n available ones are involved.
See the comments on A212359 for the Abramowitz-Stegun (A-St) order of partitions, and the 'exponentiation' to obtain multisets, used to encode color multinomials, from partitions.
The row sums of this triangle coincide with the ones of array A212359, and they are given by A072605.
Number of necklaces with n beads w over a k-ary alphabet {a1,a2,...,ak} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 1, where #(w,x) counts the letters x in word w (necklace analog of A226874). - Andrew Howroyd, Dec 20 2017

Examples

			n\m  1  2    3    4     5     6     7      8      9     10 ...
1    1
2    1  1
3    1  1    2
4    1  3    3    6
5    1  3   10   12    24
6    1  8   31   50    60   120
7    1  9   71  180   300   360   720
8    1 22  187  815  1260  2100  2520   5040
9    1 29  574 2324  6496 10080 16800  20160  40320
10   1 66 1373 9570 32268 58464 90720 151200 181440 362880
...
a(5,3) = 4 + 6 = 10, from A212359(5,4) + A212359(5,5), because k(5,3,1) = 4 and p(5,3) = 2.
a(2,1) = 1 because the partition [2] of n=2 with part number m=1 corresponds to the representative color multinomial (here monomial) c[1]^2=c[1]*c[1], and there is one such representative necklace. There is another necklace color monomial in this class of n=2 colors where only m=1 color is active: c[2]*c[2]. See the triangle entry A213935(2,1)=2.
a(3,1) = 1 from the color monomial representative c[1]^3. This class has 2 other members: c[2]^3 and c[3]^3. See A213935(3,1)=3.
In general a(n,1)=1 and A213935(n,1)=n from the partition [n] providing the color signature and a representative c[1]^n.
a(3,2)=1 from the representative color multinomial c[1]^2*c[2] (from the m=2 partition [2,1] of n=3) leading to just one representative necklace cyclic(112) (when one uses j for color c[j]). The whole class consists of A213935(3,2)=6 necklaces: cyclic(112), cyclic(113), cyclic(221), cyclic(223), cyclic(331) and  cyclic(332).
a(3,3)=2. The representative color multinomial is c[1]*c[2]*c[3] (from the m=3 partition [1,1,1]). There are the two non-equivalent representative necklaces cyclic(1,2,3) and cyclic(1,3,2) which constitute already the whole class (A213935(3,3)=2).
a(4,2) = 3 from two representative color multinomials c[1]^3*c[2] and c[1]^2*c[2]^2 (from the two m=2 partitions of n=4: [3,1] and [2,2]). The first one has one representative necklace, namely cyclic(1112), the second one originates from two representative necklaces: cyclic(1122) and cyclic(1212). Together these are the 3 necklaces counted by a(4,2). The class with the first representative consists of 4*3=12 necklaces, when all 4 colors are used. The class of the second representative consists of 2*6=12 necklaces. Together they sum up to the 24 necklaces counted by A213935(4,2).
		

Crossrefs

Cf. A008284, A072605 (row sums), A212359, A213935.
Cf. A213940 (bracelets), A226874 (words).

Programs

  • Mathematica
    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}]];
    a226874[n_, k_] := If[n k == 0, If[n == k, 1, 0], n! b[n, 1, k]];
    T[n_, k_] := (1/n) Sum[EulerPhi[n/d] a226874[d, k], {d, Divisors[n]}];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 06 2018, after Alois P. Heinz and Andrew Howroyd *)
  • PARI
    \\ here U is A226874 as vector of polynomials.
    U(n)={Vec(serlaplace(prod(k=1, n, 1/(1-y*x^k/k!) + O(x*x^n))))}
    C(n)={my(t=U(n)); vector(n, n, vector(n, k, (1/n)*sumdiv(n, d, eulerphi(n/d) * polcoeff(t[d+1], k))))}
    { my(t=C(10)); for(n=1, #t, print(t[n])) } \\ Andrew Howroyd, Dec 20 2017

Formula

a(n,m) = Sum_{j=1..p(n,m)}A212359(n,k(n,m,1)+j-1), with k(n,m,1) the position where in the list of partitions of n in A-St order the first with m parts appears, and p(n,m) the number of partitions of n with m parts shown in the array A008284. E.g., n=5, m=3: k(5,3,1)=4, p(5,3)=2.
T(n,k) = (1/n)*Sum_{d|n} phi(n/d)*A226874(d, k). - Andrew Howroyd, Dec 20 2017

A226882 Number of n-length words w over ternary alphabet {a,b,c} such that #(w,a) >= #(w,b) >= #(w,c) >= 1, where #(w,x) counts the letters x in word w.

Original entry on oeis.org

6, 12, 50, 180, 497, 1484, 5154, 13680, 41327, 134508, 368095, 1095367, 3521156, 9733564, 29025290, 92208816, 257946527, 769203752, 2428043309, 6848294497, 20442949562, 64191187508, 182286409175, 544512163065, 1702858693902, 4861764643419, 14531465607434
Offset: 3

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Examples

			a(4) = 12: aabc, aacb, abac, abca, acab, acba, baac, baca, bcaa, caab, caba, cbaa.
		

Crossrefs

Column k=3 of A226874.

Programs

  • Mathematica
    Table[Sum[n!/Product[IntegerPartitions[n,{3}][[k,j]]!,{j,1,3}],{k,1,Length[IntegerPartitions[n,{3}]]}],{n,3,30}] (* Vaclav Kotesovec, Aug 29 2014 *)

Formula

a(n) ~ 3^n/6 * (1 + 3*sqrt(3/(Pi*n))/2+sqrt(3)*(1+2*cos(2*Pi*n/3))/(Pi*n)). - Vaclav Kotesovec, Aug 29 2014

A226883 Number of n-length words w over a 4-ary alphabet {a1,a2,...,a4} such that #(w,a1) >= #(w,a2) >= ... >= #(w,a4) >= 1, where #(w,x) counts the letters x in word w.

Original entry on oeis.org

24, 60, 300, 1260, 6496, 20916, 95640, 353760, 1600104, 5626764, 23844002, 88442445, 387629456, 1389902524, 5788974504, 21752247660, 93252286444, 340374221376, 1409907258122, 5335751835865, 22620834658096, 83728749708760, 345377277971570, 1315699675342065
Offset: 4

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Crossrefs

Column k=4 of A226874.

Programs

  • Mathematica
    Table[Sum[n!/Product[IntegerPartitions[n,{4}][[k,j]]!,{j,1,4}],{k,1,Length[ IntegerPartitions[n,{4}]]}],{n,4,20}] (* Vaclav Kotesovec, Jul 01 2013 *)
Showing 1-10 of 18 results. Next