[seqfan] Re: Equals sum of neighbors mod 2

Ron Hardin rhhardin at att.net
Fri Nov 16 01:48:17 CET 2012

The situation is less chaotic for king-move neighbors instead of horizontal and 
vertical neighbors.

Every periodic increment sequence has length three.

The Empirical program in bc(1) duplicates the table (% is modulo, divide is 
integer and truncates downwards)

T(n,k)=Sum of neighbor maps: log base 2 of the number of nXk binary arrays 
indicating the locations of corresponding elements equal to the sum mod 2 of 
their king-move neighbors in a random 0..1 nXk array

Table starts

Empirical program (bc)

define t(n,k) {
    auto rowmod,rowdiv,colmod,coldiv,ansn1,deltasum,delta1,delta2,ans;
    n=n-1; k=k-1;
    rowmod=n%3; rowdiv=n/3;
    colmod=k%3; coldiv=k/3;
    ansn1=3*rowdiv+1; if(rowmod==2)ansn1+=2;
    deltasum=(n+1)*3; if(rowmod==1)deltasum-=3;
    delta2=deltasum/3; delta1=delta2*2;
    return ans;

 rhhardin at mindspring.com
rhhardin at att.net (either)

More information about the SeqFan mailing list