\\ A355042: a(n) is the number of minimal balanced subsets of a set of n labeled elements. \\ The following program is suitable for terms a(1)..a(5) and a(6) taking about 10 minutes. \\ Checks a collection of sets to see if it is minimal and balanced. \\ The collection is represented as a matrix M. Each column of the matrix \\ gives an element of the collection in binary form. \\ Returns 0,1,-1: \\ 1 means M is a solution. \\ 0 means M is not a solution but can still be a subset of one. \\ -1 means M is not a subset of any solution. ChkMatrix(M)={ if(matrank(M) < #M, -1, my( Y = vectorv(matsize(M)[1],i,1), \\ all 1's column vector X = matsolve(M, Y) ); if(M*X-Y, 0, if(#select(t->t<=0, X), -1, 1)); ) } a(n)={ \\ array of all bit sets as column vectors. These will be used to build the matrices. my(S=vector(2^n-1, k, my(t=binary(k)); concat(vector(n-#t), t)~)); \\ recursive function to build the sets and test matrices. my(recurse(u,k) = my(f=if(#u, ChkMatrix(Mat(u)))); if(f, f>0, sum(k=1, k, self()(concat(u,[S[k]]), k-1)))); \\ call the recursion recurse([], #S); } \\ show the first 5 values vector(5, n, a(n))