#Python code for A326750 by John Rascoe 7/15/2024 from itertools import chain, count, combinations, islice from sympy.utilities.iterables import connected_components from sympy.combinatorics.subsets import ksubsets def check_sys(a,b): #checks if the set-system a+b is an anti-chain for i in a: for j in b: if set(i) >= set(j) or set(i) <= set(j): return False return True def check_con(a): #checks if the set-system a is connected E = [] m = len(a) V = list(range(1,m+1)) for i in range(m): #loop through all sets of a s2 = set() for j in a[i]: #j is each element of a set for k in range(m): if j in a[k]: s2.add((i+1,k+1)) E.extend(s2) for v in connected_components((V,E)): if len(v) == m: return True def a_gen(): yield 0 for n in count(0): c = 1 t, t2, t3, v, j = [], [[]], [], [], 0 t3 =[] #t is a list of all combinations of subsets of the same size #t2 is a list of all anti-chains with max element <= n #t3 is a list of all connected anti-chains #v is a list of the bii numbers of the sets of t3 with largest element n for i in range(n): t.append([]) subsets = list(ksubsets(list(range(1,n+1)),i+1)) for k in range(len(subsets)): for u in combinations(subsets,k+1): t[i].append(u) t2[j].append(u) while n: t2.append([]) for i in t2[j]: for m in range(0,len(i[-1])-1): for k in t[m]: if check_sys(i,k): t2[j+1].append(i+k) if len(t2[j+1]) == 0: break j += 1 for i in chain.from_iterable(t2): if check_con(i): t3.append(i) for i in t3: x = sum(2**(sum(2**(m-1) for m in k)-1) for k in i) if x >= 2**(2**(n-1)-1): v.append(x) yield from sorted(v) A326750_list = list(islice(a_gen(), 100))