\\ PARI program for sequences A374514, A374985, A376162. \\ Author: Andrew Howroyd, Sep 2024. \\ The algorithm here is essentially brute force. \\ For a triangle with binomial(n+1,2) points returns for each point the set of points that are \\ immediately to the left or above. Points are numbered from 0 (although the PARI array starts at index 1) \\ Each set is stored as an integer bit-set with the k-th element indicated by bit-k. XP(n)={my(v=vector(binomial(n+1,2)), p=0); for(k=1, n, for(j=1, k, p++; if(j>1, v[p]+=1<<(p-2)); if(j1, v[p]+=1<<(p-2)); if(k>1, v[p]+=1<<(p-m-1)) )); v} \\ Given the set of points that have not yet been assigned values, determines all possible \\ sets to be assigned the next value and returns the sets of remaining unassigned points for each of these. \\ Sets are bit-sets and with each step the number of points in the set is reduced. \\ If f=0 only one point is removed at a time, so that each point will get a different value. \\ Otherwise if f=1 more than one point can receive the same value. \\ The X argument is the vector returned by XP or XR or similar. \\ The b argument is the set of points not yet assigned a value. MkNext(X,b,f)={ my(L=List()); for(i=0, #X-1, if(bittest(b,i) && bitand(b,X[i+1])==0, my(t = b - (1<