OFFSET
1,2
COMMENTS
For a definition and examples of this problem see the comment section of A276449.
The present sequence {a(n)} gives the number of all orbits under C_4 of 2-colored n X n square grids with n squares of one color.
See A054772(n, k) for the table of these total C_4 orbit numbers for 2-colored grids with any number k from {0,1,...,n^2} of squares of one color. - Wolfdieter Lang, Oct 02 2016
LINKS
Hong-Chang Wang, Table of n, a(n) for n = 1..70
FORMULA
EXAMPLE
For n = 4 there are A276449(4) = 4 1-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 .
A276451(4) = 12 2-orbits: one of them is
+ o + o o o o +
o o o o + o o o
o o o o o o o +
o + o + + o o o ,
and one can take the first one as representative.
A276452(4) = 448 4-orbits: one of them is represented by
+ + + +
o o o o
o o o o
o o o o .
The complete orbit structure for n=4 is 1^4 2^12 4^448, see A276449(4) = 4, A276451(4) = 12, A276452(4) = 448.
a(4) = 448 + 12 + 4 = 464.
A014062(4) = 448*4 + 12*2 + 4*1 = 1820.
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 + (Function[j, Binomial[2 j (j + Boole@ OddQ@ n), j]]@ Floor[n/2] - f@ n)/2 + f@ n, {n, 17}] (* Michael De Vlieger, Sep 12 2016 *)
PROG
(Python)
from math import comb as binomial
for j in range(1, 20):
t = binomial(j * j, j)
i = j // 2
if j % 2 == 0:
d = binomial(2 * i * i, i)
else:
d = binomial(2 * i * (i + 1), i)
a = (t - d) // 4
if j % 4 == 0:
c = binomial((j * j // 4), (j // 4))
elif j % 4 == 1:
c = binomial(((j - 1) // 2) * ((j - 1) // 2 + 1), ((j - 1) // 4))
else:
c = 0
b = (d - c) // 2
print(str(j) + " " + str(a + b + c))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited by Wolfdieter Lang, Oct 02 2016
STATUS
approved