how many unique patterns exist for a $N\times N$ grid I'm trying to figure out if there is a way to determine how many unique patterns exist for a given $N\times N$ grid if you choose N points on the grid. For example, for a $2\times 2$ grid we can get two unique patterns from the six possible combinations. The rest are just rotations and mirrors of the two unique patterns below

[x] [x] 
[ ] [ ]

and 

[x] [ ]
[ ] [x] 

Is there a mathematical way of determining a unique number of patterns for a NxN grid where N=3,4,5,6,7,8? 
I figured for a 3x3, there are 14 unique patterns for picking 3 random points on the grid, but it gets tedious after that.

N:  
N^2  :
N^2 Choose N
Unique pattern

2   
4    
6           
2             

3   
9    
84          
14            

4   
16   
1820        
????          

5   
25   
53130       
????          

6   
36   
1947792       
????          

7   
49   
85900584    
????          


 A: We can actually do a bit more and compute the cycle index $Z(G_N)$ for general $N$, where we have to distinguish between $N$ even and $N$ odd. This will permit lookup in the OEIS, which in turn leads to more material about this interesting problem.
We proceed to enumerate the permutations of $G_N$ by their cycle structure. For $N$ even, we get the identity, which contributes
$$a_1^{N^2}.$$
There is a vertical reflection, which contributes
$$a_2^{N^2/2},$$
the same for a horizontal reflection, i.e.
$$a_2^{N^2/2}.$$
The reflection in the rising diagonal contributes
$$a_1^N a_2^{(N^2-N)/2},$$
the same for the other diagonal, i.e.
$$a_1^N a_2^{(N^2-N)/2}.$$
What remains are the rotations. Two of these contribute (recall that $N$ is even)
$$2\times a_4^{N^2/4}$$
and one of them,
$$a_2^{N^2/2}.$$
This gives for even $N$ the cycle index
$$Z(G_N) = \frac{1}{8} 
\left( a_1^{N^2} + 3 a_2^{N^2/2} + 2 a_1^N a_2^{(N^2-N)/2} + 2  a_4^{N^2/4}\right).$$
For $N$ odd, we get the identity, which is
$$a_1^{N^2}.$$
The two reflections now contribute
$$2\times a_1^N a_2^{(N^2-N)/2}.$$
The reflection in the two diagonals are unchanged and contribute
$$2\times a_1^N a_2^{(N^2-N)/2}$$
What remains is the rotations, two of which have cycle structure
$$2\times a_1 a_4^{(N^2-1)/4}$$
and the last one has cycle structure
$$a_1 a_2^{(N^2-1)/2}.$$
This gives for odd $N$ the cycle index
$$Z(H_N) = \frac{1}{8} 
\left( a_1^{N^2} + 4 a_1^N a_2^{(N^2-N)/2} + 2 a_1 a_4^{(N^2-1)/4}+a_1 a_2^{(N^2-1)/2}\right).$$
Evidently for $N$ marks being placed on the grid we seek to compute
$$[z^N] Z(G_N)(1+z)
\quad\text{and}\quad [z^N] Z(H_N)(1+z),$$
alternating between the two for $N$ even and $N$ odd.
This produces the sequence
$$1, 2, 16, 252, 6814, 244344, 10746377, 553319048, 32611596056, 2163792255680,\ldots$$
which is A019318 from the OEIS.
Here is the Maple program that was used to compute these cycle indices.


with(numtheory);
with(group):
with(combinat):

pet_varinto_cind :=
proc(poly, ind)
           local subs1, subs2, polyvars, indvars, v, pot, res;

           res := ind;

           polyvars := indets(poly);
           indvars := indets(ind);

           for v in indvars do
               pot := op(1, v);

               subs1 :=
               [seq(polyvars[k]=polyvars[k]^pot,
               k=1..nops(polyvars))];

               subs2 := [v=subs(subs1, poly)];

               res := subs(subs2, res);
           od;

           res;
end;

G :=
proc(N)
        if type(N,odd) then return FAIL; fi;

        1/8*(a[1]^(N^2)+3*a[2]^(N^2/2)+
        2*a[1]^N*a[2]^((N^2-N)/2) + 2*a[4]^(N^2/4));
end;


H :=
proc(N)
        if type(N,even) then return FAIL; fi;

        1/8*(a[1]^(N^2)+4*a[1]^N*a[2]^((N^2-N)/2)+
        a[1]*a[2]^((N^2-1)/2) + 2*a[1]*a[4]^((N^2-1)/4));
end;




v :=
proc(N)
        option remember;
        local p, k, gf;

        if type(N, even) then
            gf := expand(pet_varinto_cind(1+z, G(N)));
        else
            gf := expand(pet_varinto_cind(1+z, H(N)));
        fi;

        coeff(gf, z, N);
end;

Here is another interesting MSE cycle index computation I. This MSE cycle index computation II is relevant also.
A: You're looking for the number of orbits of the dihedral group $D_N$ acting on the $N\times N$ grid with $N$ chosen cells.  (Caution: This group is often expressed as $D_{2N}$ as it has $2N$ elements.)  
You want to use the Cauchy-Frobenius-Burnside Lemma (aka Burnside Lemma, aka "Not Burnside Lemma") to compute this.  That is, you have a group action of $D_N$ on the set $\Omega$ of all such patterns ($N\times N$ grids with $N$ marked cells), and the number of orbits in this action (which is what you want) is then given by $$\frac{1}{2N}\sum_{g\in G} |\Omega^g|$$ where $|\Omega^g|$ is the number of elements in $\Omega$ fixed by $g$. 
A: Consider the action of the group $G$ on a set $\Omega$ of cardinality $n$.  The cycle index of $(G,\Omega)$   is the polynomial defined by $$Z_G(X_1,X_2,\dots, X_n)=\frac{1}{|G|} \sum_{g\in G}
X_1^{c_1(g)}X_2^{c_2(g)}\cdots X_n^{c_n(g)}$$ where $c_i(g)$ denotes the number of $i$-cycles in the cycle decomposition of the element $g$ acting on $\Omega$.  
For example, if we consider the action of $D_4$ on the square, we would first label the vertices of the square by $\{1,2,3,4\}$ in some order.  Let's do this in cyclic clockwise order, starting from the upper left corner.  Then we get the following table.
\begin{array}{c|c|c}
   g    &    \mbox{permutation} & \mbox{cycle index term}\\ \hline
    \mbox{identity} & (1)(2)(3)(4) & X_1^4      \\
    90^o \mbox{rotation} & (1,2,3,4) & X_4^1 \\
   180^o \mbox{rotation} & (1,3)(2,4) & X_2^2 \\
   270^o \mbox{rotation} & (1,4,3,2) & X_4^1 \\
   \mbox{horizontal reflection} & (1,4)(2,3) & X_2^2\\ 
   \mbox{vertical reflection} & (1,2)(3,4) & X_2^2\\
  \mbox{diagonal reflection} & (1,3)(2)(4) & X_1^2X_2\\
  \mbox{opposite diag reflection} & (2,4)(1)(3)& X_1^2X_2
     \end{array}
Thus we obtain as cycle index $$Z_G(X_1,X_2,\dots, X_n)=\frac{1}{8}(X_1^4 + 2X_1^2X_2+3X_2^2+2X_4). $$
Now consider $$Z_G(b+1,b^2+1,b^3+1,b^4+1).$$ The coefficient of $b^i$ will give the number (up to isomorphism!) of positions in which there are precisely $i$ marked squares.  Returning to the grid problem, we are only interested in the coefficient of the $b^2$ term. This turns out to be $\frac{1}{8}(16) = 2$.  
A: http://puzzlemaker.discoveryeducation.com/MathSquareForm.asp
Above is a link to a puzzlemaker referred to as Math Square.
It allows you to create matrice puzzle.
For example, you can create a 6x6 grid and the rows and columns are maths equation having multiplication, division, addition and subtraction. The answers to the equation are available on the extreme right and the extreme bottom of the grid. However, no number in the grid is provided. Can such a puzzle be logically or mathematically solved using any of the above methods mentioned in this thread.
