login
A277211
Number of n X n X n triangular 0..1 arrays with no 2 X 2 X 2 subblock having three equal elements.
0
1, 2, 6, 24, 130, 960, 9702, 134512, 2562516, 67152240, 2422643366, 120395521752, 8245524190254, 778511553019200, 101361018574446630, 18202576574465956224, 4509516189662784365688, 1541444043912873505870464, 727078284287957812245097914
OFFSET
0,2
FORMULA
a(n) = 2*A007017(n-1) for n>0. - Alois P. Heinz, Nov 05 2016
EXAMPLE
Some solutions for n=3:
0 0 0 1 1 1
0 1 1 0 1 1 0 0 1 0 0 1
1 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 1 0
PROG
(PARI) nextrowcomb(rowarr) = my(k=#rowarr, i=0); while(rowarr[k]==1, rowarr[k]=0; i++; k--); while(rowarr[k]==0 && k > 1, k--); if(rowarr[k]==1, rowarr[k]=0; rowarr[k+1]=1; k=k+2; while(i > 0, rowarr[k]=1; k++; i--), for(x=k, k+i, rowarr[x]=1)); rowarr
is_validcombination(toprow, bottomrow) = for(v=1, #toprow, if(toprow[v]==bottomrow[v] && toprow[v]==bottomrow[v+1], return(0))); for(w=2, #toprow, if(toprow[w-1]==bottomrow[w] && toprow[w]==bottomrow[w], return(0))); return(1)
terms(n) = my(toprows=[[0], [1]], bottomrow=[0, 0], validrows=[]); while(1, for(k=1, #toprows, if(is_validcombination(toprows[k], bottomrow), validrows=concat(validrows, [bottomrow]))); if(vecmin(bottomrow)==1, bottomrow=vector(#bottomrow+1); print1(#validrows, ", "); toprows=validrows; validrows=[], bottomrow=nextrowcomb(bottomrow)); if(#bottomrow==n+2, break))
terms(5) \\ print initial five terms
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Nov 05 2016
EXTENSIONS
Thanks to R. H. Hardin and Charles R Greathouse IV for helpful suggestions.
a(7)-a(18) from Alois P. Heinz, Nov 05 2016
STATUS
approved