[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
..1..1..3..4..4..6..7..7..9.10.10.12.13.13.15.16.16
..1..1..3..4..4..6..7..7..9.10.10.12.13.13.15.16...
..3..3..9.12.12.18.21.21.27.30.30.36.39.39.45......
..4..4.12.16.16.24.28.28.36.40.40.48.52.52.........
..4..4.12.16.16.24.28.28.36.40.40.48.52............
..6..6.18.24.24.36.42.42.54.60.60.72...............
..7..7.21.28.28.42.49.49.63.70.70..................
..7..7.21.28.28.42.49.49.63.70.....................
..9..9.27.36.36.54.63.63...........................
.10.10.30.40.40.60.70..............................
.10.10.30.40.40.60.................................
.12.12.36.48.48....................................

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;
    ans=ansn1+coldiv*deltasum;
    if(colmod>1)ans+=delta1;
    return ans;
}


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



More information about the SeqFan mailing list