OFFSET
1,3
COMMENTS
For a definition and examples of this problem see the comment section of A276449. The present sequence a(n) gives the number of 4-orbits under C_4 of such 2-colored n X n grids with n squares of one color.
LINKS
Hong-Chang Wang, Table of n, a(n) for n = 1..69
EXAMPLE
a(2) = 1: the 4-orbit is
+ + o + o o + o
o o o + + + + o ,
and one can take the first one as representative.
For n = 3 there are a(3) = 20 4-orbits, represented by
+ + + + + o + + o + + o + + o
o o o + o o o + o o o + o o o
o o o o o o o o o o o o + o o
--------------------------------------
+ + o + + o + o + + o + + o +
o o o o o o + o o o + o o o o
o + o o o + o o o o o o + o o
--------------------------------------
+ o + + o o + o o + o o + o o
o o o + + o + o + + o o + o o
o + o o o o o o o o + o o o +
--------------------------------------
+ o o + o o + o o o + o o + o
o + + o + o o o + + + o + o +
o o o o + o o + o o o o o o o .
--------------------------------------
MATHEMATICA
f[n_] := If[MemberQ[{2, 3}, #], 0, Function[i, Binomial[(2 i) (2 i + #), i]]@ Floor[n/4]] &@ Mod[n, 4]; g[n_] := (Function[j, Binomial[2 j (j + Boole@ OddQ@ n), j]]@ Floor[n/2] - f@ n)/2; Table[(Binomial[n^2, n] - 2 g@ n - f@ n)/4, {n, 18}] (* Michael De Vlieger, Sep 07 2016 *)
PROG
(Python)
import math
def nCr(n, r):
f = math.factorial
return f(n) / f(r) / f(n-r)
# main program
for j in range(101):
a = nCr(j*j, j)
i = j/2
if j%2==0:
b = nCr(2*i*i, i)
else:
b = nCr(2*i*(i+1), i)
print(str(j)+" "+str((a-b)/4))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved