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 42 results. Next

A306017 Number of non-isomorphic multiset partitions of weight n in which all parts have the same size.

Original entry on oeis.org

1, 1, 4, 6, 17, 14, 66, 30, 189, 222, 550, 112, 4696, 202, 5612, 30914, 63219, 594, 453125, 980, 3602695, 5914580, 1169348, 2510, 299083307, 232988061, 23248212, 2669116433, 14829762423, 9130, 170677509317, 13684, 1724710753084, 2199418340875, 14184712185, 38316098104262
Offset: 0

Views

Author

Gus Wiseman, Jun 17 2018

Keywords

Comments

A multiset partition of weight n is a finite multiset of finite nonempty multisets whose sizes sum to n.
Number of distinct nonnegative integer matrices with all row sums equal and total sum n up to row and column permutations. - Andrew Howroyd, Sep 05 2018
From Gus Wiseman, Oct 11 2018: (Start)
Also the number of non-isomorphic multiset partitions of weight n in which each vertex appears the same number of times. For n = 4, non-isomorphic representatives of these 17 multiset partitions are:
{{1,1,1,1}}
{{1,1,2,2}}
{{1,2,3,4}}
{{1},{1,1,1}}
{{1},{1,2,2}}
{{1},{2,3,4}}
{{1,1},{1,1}}
{{1,1},{2,2}}
{{1,2},{1,2}}
{{1,2},{3,4}}
{{1},{1},{1,1}}
{{1},{1},{2,2}}
{{1},{2},{1,2}}
{{1},{2},{3,4}}
{{1},{1},{1},{1}}
{{1},{1},{2},{2}}
{{1},{2},{3},{4}}
(End)

Examples

			Non-isomorphic representatives of the a(4) = 17 multiset partitions:
  {{1,1,1,1}}
  {{1,1,2,2}}
  {{1,2,2,2}}
  {{1,2,3,3}}
  {{1,2,3,4}}
  {{1,1},{1,1}}
  {{1,1},{2,2}}
  {{1,2},{1,2}}
  {{1,2},{2,2}}
  {{1,2},{3,3}}
  {{1,2},{3,4}}
  {{1,3},{2,3}}
  {{1},{1},{1},{1}}
  {{1},{1},{2},{2}}
  {{1},{2},{2},{2}}
  {{1},{2},{3},{3}}
  {{1},{2},{3},{4}}
		

Crossrefs

Programs

  • Mathematica
    permcount[v_List] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    K[q_List, t_, k_] := SeriesCoefficient[1/Product[g = GCD[t, q[[j]]]; (1 - x^(q[[j]]/g))^g, {j, 1, Length[q]}], {x, 0, k}];
    RowSumMats[n_, m_, k_] := Module[{s = 0}, Do[s += permcount[q]* SeriesCoefficient[Exp[Sum[K[q, t, k]/t*x^t, {t, 1, n}]], {x, 0, n}], {q, IntegerPartitions[m]}]; s/m!];
    a[n_] := a[n] = If[n==0, 1, If[PrimeQ[n], 2 PartitionsP[n], Sum[ RowSumMats[ n/d, n, d], {d, Divisors[n]}]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 35}] (* Jean-François Alcover, Nov 07 2019, after Andrew Howroyd *)
  • PARI
    \\ See A318951 for RowSumMats.
    a(n)={sumdiv(n,d,RowSumMats(n/d,n,d))} \\ Andrew Howroyd, Sep 05 2018

Formula

For p prime, a(p) = 2*A000041(p).
a(n) = Sum_{d|n} A331485(n/d, d). - Andrew Howroyd, Feb 09 2020

Extensions

Terms a(11) and beyond from Andrew Howroyd, Sep 05 2018

A116539 Number of zero-one matrices with n ones and no zero rows or columns and with distinct rows, up to permutation of rows.

Original entry on oeis.org

1, 1, 2, 7, 28, 134, 729, 4408, 29256, 210710, 1633107, 13528646, 119117240, 1109528752, 10889570768, 112226155225, 1210829041710, 13640416024410, 160069458445202, 1952602490538038, 24712910192430620, 323964329622503527, 4391974577299578248, 61488854148194151940
Offset: 0

Views

Author

Vladeta Jovovic, Mar 27 2006

Keywords

Comments

Also the number of labeled hypergraphs spanning an initial interval of positive integers with edge-sizes summing to n. - Gus Wiseman, Dec 18 2018

Examples

			From _Gus Wiseman_, Dec 18 2018: (Start)
The a(3) = 7 edge-sets:
    {{1,2,3}}
   {{1},{1,2}}
   {{2},{1,2}}
   {{1},{2,3}}
   {{2},{1,3}}
   {{3},{1,2}}
  {{1},{2},{3}}
Inequivalent representatives of the a(4) = 28 0-1 matrices:
  [1111]
.
  [100][1000][010][0100][001][0010][0001][110][110][1100][101][1010][1001]
  [111][0111][111][1011][111][1101][1110][101][011][0011][011][0101][0110]
.
  [10][100][100][1000][100][100][1000][1000][010][010][0100][0100][0010]
  [01][010][010][0100][001][001][0010][0001][001][001][0010][0001][0001]
  [11][101][011][0011][110][011][0101][0110][110][101][1001][1010][1100]
.
  [1000]
  [0100]
  [0010]
  [0001]
(End)
		

Crossrefs

Binary matrices with distinct rows and columns, various versions: A059202, A088309, A088310, A088616, A089673, A089674, A093466, A094000, A094223, A116532, A116539, A181230, A259763
Row sums of A326914 and of A326962.

Programs

  • Maple
    b:= proc(n, i, k) b(n, i, k):=`if`(n=0, 1, `if`(i<1, 0, add(b(n-i*j,
          min(n-i*j, i-1), k)*binomial(binomial(k, i), j), j=0..n/i)))
        end:
    a:= n-> add(add(b(n$2, i)*(-1)^(k-i)*binomial(k, i), i=0..k), k=0..n):
    seq(a(n), n=0..23);  # Alois P. Heinz, Sep 13 2019
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, Min[n - i*j, i - 1], k]*Binomial[Binomial[k, i], j], {j, 0, n/i}]]];
    a[n_] := Sum[Sum[b[n, n, i]*(-1)^(k-i)*Binomial[k, i], {i, 0, k}], {k, 0, n}];
    a /@ Range[0, 23] (* Jean-François Alcover, Feb 25 2020, after Alois P. Heinz *)

Extensions

a(0)=1 prepended and more terms added by Alois P. Heinz, Sep 13 2019

A016031 De Bruijn's sequence: 2^(2^(n-1) - n): number of ways of arranging 2^n bits in circle so all 2^n consecutive strings of length n are distinct.

Original entry on oeis.org

1, 1, 2, 16, 2048, 67108864, 144115188075855872, 1329227995784915872903807060280344576, 226156424291633194186662080095093570025917938800079226639565593765455331328
Offset: 1

Views

Author

Keywords

Comments

Sequence corresponds also to the largest number that may be determined by asking no more than 2^(n-1) - 1 questions("Yes"-or-"No" answerable) with lying allowed at most once. - Lekraj Beedassy, Jul 15 2002
Number of Ouroborean rings for binary n-tuplets. - Lekraj Beedassy, May 06 2004
Also the number of games of Nim that are wins for the second player when the starting position is either the empty heap or heaps of sizes 1 <= t_1 < t_2 < ... < t_k < 2^(n-1) (if n is 1, the only starting position is the empty heap). E.g.: a(4) = 16: the winning positions for the second player when all the heap sizes are different and less than 2^3: (4,5,6,7), (3,5,6), (3,4,7), (2,5,7), (2,4,6), (2,3,6,7), (2,3,4,5), (1,6,7), (1,4,5), (1,3,5,7), (1,3,4,6), (1,2,5,6), (1,2,4,7), (1,2,3), (1,2,3,4,5,6,7) and the empty heap. - Kennan Shelton (kennan.shelton(AT)gmail.com), Apr 14 2006
a(n + 1) = 2^(2^n-n-1) = 2^A000295(n) is also the number of set-systems on n vertices with no singletons. The case with singletons is A058891. The unlabeled case is A317794. The spanning/covering case is A323816. The antichain case is A006126. The connected case is A323817. The uniform case is A306021(n) - 1. The graphical case is A006125. The chain case is A005840. - Gus Wiseman, Feb 01 2019
Named after the Dutch mathematician Nicolaas Govert de Bruijn (1918-2012). - Amiram Eldar, Jun 20 2021

References

  • Jonathan L. Gross and Jay Yellen, eds., Handbook of Graph Theory, CRC Press, 2004, p. 255.
  • Frank Harary and Edgar M. Palmer, Graphical Enumeration, 1973, p. 31.
  • D. J. Newman, "A variation of the Game of Twenty Question", in: Murray S. Klamkin (ed.), Problems in Applied Mathematics, Philadelphia, PA: SIAM, 1990, Problem 66-20, pp. 121-122.
  • Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Cor. 5.6.15.
  • Ian Stewart, Game, Set and Math, pp. 50, Penguin 1991.

Crossrefs

Cf. A000295, A003465, A006125, A058891 (set systems), A317794 (unlabeled case), A323816 (spanning case), A323817 (connected case), A331691 (alternating signs).

Programs

Formula

a(n) = 2^A000295(n-1). - Lekraj Beedassy, Jan 17 2007
Shifting once to the left gives the binomial transform of A323816. - Gus Wiseman, Feb 01 2019

A295193 Number of regular simple graphs on n labeled nodes.

Original entry on oeis.org

1, 2, 2, 8, 14, 172, 932, 45936, 1084414, 155862512, 10382960972, 6939278572096, 2203360500122300, 4186526756621772344, 3747344008241368443820, 35041787059691023579970848, 156277111373303386104606663422, 4142122641757598618318165240180096
Offset: 1

Views

Author

Álvar Ibeas, Nov 16 2017

Keywords

Examples

			From _Gus Wiseman_, Dec 19 2018: (Start)
A graph is regular if all vertices have the same degree. For example, the a(4) = 8 simple regular graphs are:
  1 2
  3 4
.
  4---1  3---1  2---1
  3---2  4---2  4---3
.
  3---4  4---3  4---2
  |   |  |   |  |   |
  1---2  1---2  1---3
.
  4---3
  | X |
  2---1
(End)
		

Crossrefs

Row sums of A059441.

Programs

  • Mathematica
    Table[Sum[SeriesCoefficient[Product[1+Times@@x/@s,{s,Subsets[Range[n],{2}]}],Sequence@@Table[{x[i],0,k},{i,n}]],{k,0,n-1}],{n,1,9}] (* Gus Wiseman, Dec 19 2018 *)
  • PARI
    \\ See link for program file.
    for(n=1, 10, print1(A295193(n), ", ")) \\ Andrew Howroyd, Aug 28 2019

Extensions

a(16)-a(18) from Andrew Howroyd, Aug 28 2019

A000665 Number of 3-uniform hypergraphs on n unlabeled nodes, or equivalently number of relations with 3 arguments on n nodes.

Original entry on oeis.org

1, 1, 1, 2, 5, 34, 2136, 7013320, 1788782616656, 53304527811667897248, 366299663432194332594005123072, 1171638318502989084030402509596875836036608, 3517726593606526072882013063011594224625680712384971214848
Offset: 0

Views

Author

Keywords

Comments

The Qian reference has one incorrect term. The formula given in corollary 2.6 also contains a minor error. The second summation needs to be over p_i*p_j*p_h/lcm(p_i, p_j, p_h) rather than gcd(p_i, p_j, p_h)^2. - Andrew Howroyd, Dec 11 2018

Examples

			From _Gus Wiseman_, Dec 13 2018: (Start)
Non-isomorphic representatives of the a(5) = 34 hypergraphs:
  {}
  {{123}}
  {{125}{345}}
  {{134}{234}}
  {{123}{245}{345}}
  {{124}{134}{234}}
  {{135}{245}{345}}
  {{145}{245}{345}}
  {{123}{124}{134}{234}}
  {{123}{145}{245}{345}}
  {{124}{135}{245}{345}}
  {{125}{135}{245}{345}}
  {{134}{235}{245}{345}}
  {{145}{235}{245}{345}}
  {{123}{124}{135}{245}{345}}
  {{123}{145}{235}{245}{345}}
  {{124}{134}{235}{245}{345}}
  {{134}{145}{235}{245}{345}}
  {{135}{145}{235}{245}{345}}
  {{145}{234}{235}{245}{345}}
  {{123}{124}{134}{235}{245}{345}}
  {{123}{134}{145}{235}{245}{345}}
  {{123}{145}{234}{235}{245}{345}}
  {{124}{135}{145}{235}{245}{345}}
  {{125}{135}{145}{235}{245}{345}}
  {{135}{145}{234}{235}{245}{345}}
  {{123}{124}{135}{145}{235}{245}{345}}
  {{124}{135}{145}{234}{235}{245}{345}}
  {{125}{135}{145}{234}{235}{245}{345}}
  {{134}{135}{145}{234}{235}{245}{345}}
  {{123}{124}{135}{145}{234}{235}{245}{345}}
  {{125}{134}{135}{145}{234}{235}{245}{345}}
  {{124}{125}{134}{135}{145}{234}{235}{245}{345}}
  {{123}{124}{125}{134}{135}{145}{234}{235}{245}{345}}
(End)
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 231.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A092337. Spanning 3-uniform hypergraphs are counted by A322451.
Column k=3 of A309858.

Programs

  • Mathematica
    (* about 85 seconds on a laptop computer *)
    Needs["Combinatorica`"];Table[A = Subsets[Range[n],{3}];CycleIndex[Replace[Map[Sort,System`PermutationReplace[A, SymmetricGroup[n]], {2}],Table[A[[i]] -> i, {i, 1, Length[A]}], 2], s] /. Table[s[i] -> 2, {i, 1, Binomial[n, 3]}], {n, 1, 8}] (* Geoffrey Critzer, Oct 28 2015 *)
    Table[Sum[2^PermutationCycles[Ordering[Map[Sort,Subsets[Range[n],{3}]/.Rule@@@Table[{i,prm[[i]]},{i,n}],{1}]],Length],{prm,Permutations[Range[n]]}]/n!,{n,8}] (* Gus Wiseman, Dec 13 2018 *)
    permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[p_] := Sum[Ceiling[(p[[i]] - 1)*((p[[i]] - 2)/6)], {i, 1, Length[p]}] + Sum[Sum[c = p[[i]]; d = p[[j]]; GCD[c, d]*(c + d - 2 + Mod[(c - d)/GCD[c, d], 2])/2 + Sum[c*d*p[[k]]/LCM[c, d, p[[k]]], {k, 1, j - 1}], {j, 1, i - 1}], {i, 2, Length[p]}];
    a[n_] := Module[{s = 0}, Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!];
    a /@ Range[0, 12] (* Jean-François Alcover, Jan 08 2021, after Andrew Howroyd *)
  • PARI
    permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
    edges(p)={sum(i=1, #p, ceil((p[i]-1)*(p[i]-2)/6)) + sum(i=2, #p, sum(j=1, i-1, my(c=p[i], d=p[j]); gcd(c,d)*(c + d - 2 + (c-d)/gcd(c,d)%2)/2 + sum(k=1, j-1, c*d*p[k]/lcm(lcm(c,d), p[k]))))}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*2^edges(p)); s/n!} \\ Andrew Howroyd, Dec 11 2018

Extensions

Corrected and extended by Vladeta Jovovic
a(0)=1 prepended and a(12) from Andrew Howroyd, Dec 11 2018

A317583 Number of multiset partitions of normal multisets of size n such that all blocks have the same size.

Original entry on oeis.org

1, 4, 8, 30, 32, 342, 128, 3754, 11360, 56138, 2048, 3834670, 8192, 27528494, 577439424, 2681075210, 131072, 238060300946, 524288, 11045144602614, 115488471132032, 49840258213638, 8388608, 152185891301461434, 140102945910265344, 124260001149229146, 85092642310351607968
Offset: 1

Views

Author

Gus Wiseman, Aug 01 2018

Keywords

Comments

A multiset is normal if it spans an initial interval of positive integers.
a(n) is the number of nonnegative integer matrices with total sum n, nonzero rows and each column with the same sum with columns in nonincreasing lexicographic order. - Andrew Howroyd, Jan 15 2020

Examples

			The a(3) = 8 multiset partitions:
  {{1,1,1}}
  {{1,1,2}}
  {{1,2,2}}
  {{1,2,3}}
  {{1},{1},{1}}
  {{1},{1},{2}}
  {{1},{2},{2}}
  {{1},{2},{3}}
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    allnorm[n_]:=Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    Table[Length[Select[Join@@mps/@allnorm[n],SameQ@@Length/@#&]],{n,8}]
  • PARI
    \\ here U(n,m) gives number for m blocks of size n.
    U(n,m)={sum(k=1, n*m, binomial(binomial(k+n-1, n)+m-1, m)*sum(r=k, n*m, binomial(r, k)*(-1)^(r-k)) )}
    a(n)={sumdiv(n, d, U(d, n/d))} \\ Andrew Howroyd, Sep 15 2018

Formula

a(p) = 2^p for prime p. - Andrew Howroyd, Sep 15 2018
a(n) = Sum_{d|n} A331315(n/d, d). - Andrew Howroyd, Jan 15 2020

Extensions

Terms a(9) and beyond from Andrew Howroyd, Sep 15 2018

A319189 Number of uniform regular hypergraphs spanning n vertices.

Original entry on oeis.org

1, 1, 2, 3, 10, 29, 3780, 5012107
Offset: 0

Views

Author

Gus Wiseman, Dec 17 2018

Keywords

Comments

We define a hypergraph to be any finite set of finite nonempty sets. A hypergraph is uniform if all edges have the same size, and regular if all vertices have the same degree. The span of a hypergraph is the union of its edges.
Also the number of 0-1 matrices with n columns, all distinct rows, no zero columns, equal row-sums, and equal column-sums, up to a permutation of the rows.

Examples

			The a(4) = 10 edge-sets:
               {{1,2,3,4}}
              {{1,2},{3,4}}
              {{1,3},{2,4}}
              {{1,4},{2,3}}
            {{1},{2},{3},{4}}
        {{1,2},{1,3},{2,4},{3,4}}
        {{1,2},{1,4},{2,3},{3,4}}
        {{1,3},{1,4},{2,3},{2,4}}
    {{1,2,3},{1,2,4},{1,3,4},{2,3,4}}
  {{1,2},{1,3},{1,4},{2,3},{2,4},{3,4}}
Inequivalent representatives of the a(4) = 10 matrices:
  [1 1 1 1]
.
  [1 1 0 0] [1 0 1 0] [1 0 0 1]
  [0 0 1 1] [0 1 0 1] [0 1 1 0]
.
  [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 0 1 0] [1 1 1 0]
  [0 1 0 0] [1 0 1 0] [1 0 0 1] [1 0 0 1] [1 1 0 1]
  [0 0 1 0] [0 1 0 1] [0 1 1 0] [0 1 1 0] [1 0 1 1]
  [0 0 0 1] [0 0 1 1] [0 0 1 1] [0 1 0 1] [0 1 1 1]
.
  [1 1 0 0]
  [1 0 1 0]
  [1 0 0 1]
  [0 1 1 0]
  [0 1 0 1]
  [0 0 1 1]
		

Crossrefs

Uniform hypergraphs are counted by A306021. Unlabeled uniform regular multiset partitions are counted by A319056. Regular graphs are A295193. Uniform clutters are A299353.

Programs

  • Mathematica
    Table[Sum[SeriesCoefficient[Product[1+Times@@x/@s,{s,Subsets[Range[n],{m}]}],Sequence@@Table[{x[i],0,k},{i,n}]],{m,0,n},{k,1,Binomial[n,m]}],{n,5}]

Extensions

a(7) from Jinyuan Wang, Jun 20 2020

A322794 Number of factorizations of n into factors > 1 where all factors have the same number of prime factors counted with multiplicity.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 4, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 2, 3, 2, 2, 1, 4, 1, 2, 2, 4, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 3, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Dec 26 2018

Keywords

Comments

Also the number of uniform multiset partitions of the multiset of prime indices of n, where a multiset partition is uniform if all parts have the same size.

Examples

			The a(1260) = 13 factorizations:
  (1260)  (18*70)   (4*9*35)   (2*2*3*3*5*7)
          (20*63)   (6*6*35)
          (28*45)   (4*15*21)
          (30*42)   (6*10*21)
          (12*105)  (6*14*15)
                    (9*10*14)
The a(1260) = 13 multiset partitions:
  {{1},{1},{2},{2},{3},{4}}
     {{1,1},{2,2},{3,4}}
     {{1,1},{2,3},{2,4}}
     {{1,2},{1,2},{3,4}}
     {{1,2},{1,3},{2,4}}
     {{1,2},{1,4},{2,3}}
     {{2,2},{1,3},{1,4}}
      {{1,1,2},{2,3,4}}
      {{1,2,2},{1,3,4}}
      {{1,1,3},{2,2,4}}
      {{1,1,4},{2,2,3}}
      {{1,2,3},{1,2,4}}
       {{1,1,2,2,3,4}}
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],SameQ@@PrimeOmega/@#&]],{n,100}]

A299471 Regular triangle where T(n,k) is the number of labeled k-uniform hypergraphs spanning n vertices.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 41, 11, 1, 1, 768, 958, 26, 1, 1, 27449, 1042642, 32596, 57, 1, 1, 1887284, 34352419335, 34359509614, 2096731, 120, 1, 1, 252522481, 72057319189324805, 1180591620442534312297, 72057594021152435, 268434467, 247, 1, 1, 66376424160
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2018

Keywords

Examples

			Triangle begins:
  1;
  1,     1;
  1,     4,       1;
  1,    41,      11,     1;
  1,   768,     958,    26,  1;
  1, 27449, 1042642, 32596, 57, 1;
  ...
		

Crossrefs

Columns 1..4 are A000012, A006129, A302374, A302396.
Row sums are A306021.
The unlabeled version is A301922.
The connected version is A299354.

Programs

  • Mathematica
    Table[Sum[(-1)^(n-d)*Binomial[n,d]*2^Binomial[d,k],{d,0,n}],{n,10},{k,n}]
  • PARI
    T(n, k) = sum(d = 0, n, (-1)^(n-d)*binomial(n,d)*2^binomial(d,k)) \\ Andrew Howroyd, Jan 16 2024

Formula

T(n, k) = Sum_{d = 0..n} (-1)^(n-d)*binomial(n,d)*2^binomial(d,k).

A326512 Number of set partitions of {1..n} where every block has the same average.

Original entry on oeis.org

1, 1, 1, 2, 2, 5, 5, 18, 16, 75, 64, 405, 302, 2581, 1693, 19872, 11295, 175807, 87524, 1851135, 787515, 21909766, 8185713, 298698113, 96514608, 4538610230, 1285072142
Offset: 0

Views

Author

Gus Wiseman, Jul 11 2019

Keywords

Comments

The common average is necessarily (n+1)/2. The number of blocks with this average is given by A070925. - Christian Sievers, Aug 22 2024

Examples

			The a(1) = 1 through a(7) = 18 set partitions:
  {1}  {12}  {123}    {1234}    {12345}      {123456}      {1234567}
             {13}{2}  {14}{23}  {1245}{3}    {1256}{34}    {123567}{4}
                                {135}{24}    {1346}{25}    {12467}{35}
                                {15}{234}    {16}{2345}    {1267}{345}
                                {15}{24}{3}  {16}{25}{34}  {13457}{26}
                                                           {1357}{246}
                                                           {1456}{237}
                                                           {147}{2356}
                                                           {156}{2347}
                                                           {17}{23456}
                                                           {1267}{35}{4}
                                                           {1357}{26}{4}
                                                           {147}{26}{35}
                                                           {156}{237}{4}
                                                           {17}{2356}{4}
                                                           {17}{246}{35}
                                                           {17}{26}{345}
                                                           {17}{26}{35}{4}
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],SameQ@@Mean/@#&]],{n,0,8}]

Extensions

a(12)-a(15) from Alois P. Heinz, Jul 12 2019
a(16)-a(26) from Christian Sievers, Aug 22 2024
Showing 1-10 of 42 results. Next