OFFSET
1,2
COMMENTS
EXAMPLE
The balanced color scheme [2,2,2] has with A330661 the index 5 in A328773. So there are T(6,3) = A328773(6,5) = 135032832 digraphs with 6 nodes two each in the same color.
Triangle T(n,k) begins:
1;
3, 4;
16, 36, 64;
218, 1104, 2112, 4096;
9608, 90416, 266496, 528384, 1048576;
1540944, 30194176, 135032832, 269500416, 537919488, 1073741824;
...
PROG
(PARI)
\\ here C(p) computes 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, [])}
Row(n)={apply(C, vecsort([Vecrev(p) | p<-partitions(n), p[#p]-p[1]<=1], , 4))}
{ for(n=1, 6, print(Row(n))) }
CROSSREFS
KEYWORD
AUTHOR
Peter Dolland, Dec 25 2019
STATUS
approved