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

A319193 Irregular triangle where T(n,k) is the number of permutations of the integer partition with Heinz number A215366(n,k).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 2, 3, 3, 4, 1, 1, 2, 2, 1, 1, 3, 6, 6, 4, 5, 1, 1, 2, 2, 2, 6, 3, 3, 3, 4, 4, 12, 10, 5, 6, 1, 1, 2, 2, 1, 3, 2, 3, 6, 6, 3, 1, 12, 4, 12, 6, 10, 5, 20, 15, 6, 7, 1, 1, 2, 2, 2, 3, 2, 6, 3, 3, 4, 6, 6, 1, 12, 12, 4, 12
Offset: 0

Views

Author

Gus Wiseman, Sep 13 2018

Keywords

Comments

A refinement of Pascal's triangle, these are the unsigned coefficients appearing in the expansion of homogeneous symmetric functions in terms of elementary symmetric functions.

Examples

			Triangle begins:
  1
  1
  1  1
  1  2  1
  1  1  2  3  1
  1  2  2  3  3  4  1
  1  2  2  1  1  3  6  6  4  5  1
The fourth row corresponds to the symmetric function identity: h(4) = -e(4) + e(22) + 2 e(31) - 3 e(211) + e(1111).
		

Crossrefs

A different row ordering is A072811.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i<2, [2^n], [seq(
          map(p-> p*ithprime(i)^j, b(n-i*j, i-1))[], j=0..n/i)])
        end:
    T:= n-> map(m-> (l-> add(i, i=l)!/mul(i!, i=l))(map(
            i-> i[2], ifactors(m)[2])), sort(b(n$2)))[]:
    seq(T(n), n=0..10);  # Alois P. Heinz, Feb 14 2020
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Permutations[primeMS[k]]],{n,6},{k,Sort[Times@@Prime/@#&/@IntegerPartitions[n]]}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0 || i < 2, {2^n}, Flatten[Table[ #*Prime[i]^j& /@ b[n - i*j, i - 1], {j, 0, n/i}]]];
    T[n_] := Map[Function[m, Function[l, Total[l]!/Times @@ (l!)][ FactorInteger[m][[All, 2]]]], Sort[b[n, n]]];
    T /@ Range[0, 10] // Flatten (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

Formula

T(n,k) = A008480(A215366(n,k)).

Extensions

T(0,1)=1 prepended by Alois P. Heinz, Feb 14 2020

A102462 Max{ k!/(a(1)!*a(2)!*..*a(n)!) : a(1) + 2*a(2) + 3*a(3) + ... + n*a(n) = n, a(1) + a(2) + ... + a(n) = k }.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 12, 20, 30, 60, 105, 168, 280, 504, 840, 1512, 2520, 5040, 9240, 15840, 27720, 55440, 102960, 180180, 360360, 675675, 1201200, 2162160, 4084080, 7351344, 12697776, 24504480, 46558512, 84651840, 155195040, 296281440, 543182640, 961015440
Offset: 0

Views

Author

Vladeta Jovovic, Feb 23 2005

Keywords

Comments

a(n) is the greatest number in row n of A048996 and in row n of A072811. Thus a(n) is the greatest number of compositions (permutations) obtainable from some partition of n. Example: a(7)=12 is the greatest number of compositions from some partition of 7, specifically, the partition {3,2,1,1}. - Clark Kimberling, Dec 24 2006
The partition(s) giving this optimum is always one where #{parts equal to i} >= #{parts equal to j} if i <= j. These partitions are counted in A007294. - Franklin T. Adams-Watters, Apr 08 2008
The number of partition(s) giving this optimum is given by A198254. - Olivier Gérard, Nov 17 2011

Crossrefs

Programs

  • Maple
    b:= proc(n,i,p) option remember; `if`(n=0 or i=1, (p+n)!/n!,
           max(seq(b(n-i*j, i-1, p+j)/j!, j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 15 2015
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (p + n)!/n!, Max[Table[ b[n-i*j, i-1, p+j]/j!, {j, 0, n/i}]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 19 2015, after Alois P. Heinz *)

A329874 Array read by antidiagonals: A(n,k) = number of digraphs on n unlabeled nodes, arbitrarily colored with k given colors (n >= 1, k >= 1).

Original entry on oeis.org

1, 2, 3, 3, 10, 16, 4, 21, 104, 218, 5, 36, 328, 3044, 9608, 6, 55, 752, 14814, 291968, 1540944, 7, 78, 1440, 45960, 2183400, 96928992, 882033440, 8, 105, 2456, 111010, 9133760, 1098209328, 112282908928, 1793359192848
Offset: 1

Views

Author

Peter Dolland, Nov 23 2019

Keywords

Comments

The coloring of nodes is unrestricted. There is no constraint that all of the k colors have to be used. Nodes with different colors are counted as distinct, nodes with the same color are not. For digraphs with a fixed color set see A329546.

Examples

			First six rows and columns:
      1        2          3          4           5           6
      3       10         21         36          55          78
     16      104        328        752        1440        2456
    218     3044      14814      45960      111010      228588
   9608   291968    2183400    9133760    27755016    68869824
1540944 96928992 1098209328 6154473664 23441457680 69924880288
...
n=4, k=3 with A329546:
A(4,3) = 3*218 + 3*2608 + 6336 = 14814.
		

Crossrefs

Cf. A000273 digraphs with one color, A000595 binary relations, A329546 digraphs with exactly k colors, A328773 digraphs with a given color scheme.

Programs

  • PARI
    \\ here C(p) computes A328773 sequence value for given partition.
    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(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i], v[j]))) + sum(i=1, #v, v[i]-1)}
    C(p)={((i, v)->if(i>#p, 2^edges(v), my(s=0); forpart(q=p[i], s+=permcount(q)*self()(i+1, concat(v, Vec(q)))); s/p[i]!))(1, [])}
    \\ here mulp(v) computes the multiplicity of the given partition. (see A072811)
    mulp(v) = {my(p=(#v)!, k=1); for(i=2, #v, k=if(v[i]==v[i-1], k+1, p/=k!; 1)); p/k!}
    wC(p)=mulp(p)*C(p)
    A329546(n)={[vecsum(apply(wC, vecsort([Vecrev(p) | p<-partitions(n),#p==m], , 4))) | m<-[1..n]]}
    Row(n)=vector(6, k, binomial(k)[2..min(k,n)+1]*A329546(n)[1..min(k,n)]~)
    { for(n=0, 6, print(Row(n))) }

Formula

A(1,k) = k.
A(2,k) = k*(2*k+1).
A(n,1) = A000273(n).
A(n,2) = A000595(n).
A(n,4) = A353996(n+1). - Brendan McKay, May 13 2022
A(n,k) = Sum_{i=1..min(n,k)} binomial(k,i)*A329546(n,i).

A198254 Number of maximum-diversity partitions of n.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Olivier Gérard, Oct 22 2011

Keywords

Comments

A maximum-diversity partition of n is an integer partition whose part distribution maximizes the number of different compositions (=distinct partition orderings) that can be constructed from it.
An integer composition of n corresponds to a subgroup of the symmetric group on n element whose cycles are formed of contiguous integers.

Examples

			For n=17, there are 3 partitions reaching the maximum possible of 7!/2 =2520 distinct orderings : {4, 3, 2, 2, 2, 1, 1, 1, 1}, {4, 3, 2, 2, 1, 1, 1, 1, 1, 1} and {3, 3, 2, 2, 2, 1, 1, 1, 1, 1}.
		

Crossrefs

A102462 gives the number of compositions that can be constructed from a maximum-diversity partition of n.

A329546 Triangle read by rows: T(n,k) is the number of colored digraphs on n nodes with exactly k colors arbitrarily assigned (1 <= k <= n).

Original entry on oeis.org

1, 3, 4, 16, 72, 64, 218, 2608, 6336, 4096, 9608, 272752, 1336320, 2113536, 1048576, 1540944, 93847104, 812045184, 2337046528, 2689597440, 1073741824, 882033440, 110518842048, 1580861402112, 7344135176192, 14676310097920, 13200581984256, 4398046511104
Offset: 1

Views

Author

Peter Dolland, Nov 16 2019

Keywords

Comments

The values are weighted subtotals of the rows of the irregular triangle A328773.
The weight of a color scheme is the multiplicity A072811(n,k) with k as the index of the induced partition.
T(n,k) gives the number of digraphs (see A000273) without restrictions, where nodes of the same color are not differentiated.
If we do not consider the exchange of colors with different sizes to be different digraphs, we can impose an order on the colors, which leads to A329541.

Examples

			First six rows:
      1
      3        4
     16       72        64
    218     2608      6336       4096
   9608   272752   1336320    2113536    1048576
1540944 93847104 812045184 2337046528 2689597440 1073741824
n=4, k=2: Partitions: [3,1] and [2,2] with indices 2 and 3 and multiplicities 2 and 1: T(4,2) = Sum_{i=2,3} A072811(4,i)*A328773(4,i) = 2*752 + 1104 = 2608.
n=6, k=3: Partitions: [4,1,1], [3,2,1], [2,2,2] with indexes 4, 6, 8 and multiplicities 3, 6, 1: T(6,3) = Sum_{i=4,6,8} A072811(6,i)*A328773(6,i) = 3*45277312 + 6*90196736 + 1*135032832 = 812045184.
		

Crossrefs

Cf. A000273 (digraphs with one color), A053763 (digraphs with n colors), A328773 (digraphs to a given color scheme).
Cf. A072811 (multiplicity of color schemes).
Cf. A329541 (ordered colors).
Cf. A309980 (reflexive/anti-reflexive: just two colors).

Programs

  • PARI
    \\ here C(p) computes A328773 sequence value for given partition.
    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(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i], v[j]))) + sum(i=1, #v, v[i]-1)}
    C(p)={((i, v)->if(i>#p, 2^edges(v), my(s=0); forpart(q=p[i], s+=permcount(q)*self()(i+1, concat(v, Vec(q)))); s/p[i]!))(1, [])}
    \\ here mulp(v) computes the multiplicity of the given partition. (see A072811)
    mulp(v) = {my(p=(#v)!, k=1); for(i=2, #v, k=if(v[i]==v[i-1], k+1, p/=k!; 1)); p/k!}
    wC(p)=mulp(p)*C(p)
    Row(n)={[vecsum(apply(wC, vecsort([Vecrev(p) | p<-partitions(n),#p==m], , 4))) | m<-[1..n]]}
    { for(n=0, 10, print(Row(n))) }

Formula

T(n,1) = A000273(n) = A328773(n,1).
T(n,n) = A053763(n) = A328773(n,A000041(n)).
T(n,n-1) = (n-1)*A328773(n,A000041(n)-1).
T(n,k) = Sum_{i=1..A000041(n), A063008(n,i) encodes a partition with k elements} A072811(n,i)*A328773(n,i).
Showing 1-5 of 5 results.