login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #24 Nov 09 2016 09:02:04

%S 1,2,6,24,130,960,9702,134512,2562516,67152240,2422643366,

%T 120395521752,8245524190254,778511553019200,101361018574446630,

%U 18202576574465956224,4509516189662784365688,1541444043912873505870464,727078284287957812245097914

%N Number of n X n X n triangular 0..1 arrays with no 2 X 2 X 2 subblock having three equal elements.

%F a(n) = 2*A007017(n-1) for n>0. - _Alois P. Heinz_, Nov 05 2016

%e Some solutions for n=3:

%e 0 0 0 1 1 1

%e 0 1 1 0 1 1 0 0 1 0 0 1

%e 1 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 1 0

%o (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

%o 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)

%o 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))

%o terms(5) \\ print initial five terms

%Y Cf. A007017, A271069, A271333, A271400.

%K nonn

%O 0,2

%A _Felix Fröhlich_, Nov 05 2016

%E Thanks to _R. H. Hardin_ and _Charles R Greathouse IV_ for helpful suggestions.

%E a(7)-a(18) from _Alois P. Heinz_, Nov 05 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 16:26 EDT 2024. Contains 374358 sequences. (Running on oeis4.)