I try to derive the formula for the first term (with white in the center) on board size n. For convenience let n = 2k + 1, i.e. k is the width of the half-board (except the center lines).
Class A:4 rays on the symmetry-lines x=0 and y=0: x+, x-, y+, y-, containing k stones each.
Class B: 4 rays on the symmetry-lines x=y and x=-y: x+y+, x-y+, x-y-, x+y-, containing k stones each.
(Class A and B could be merged)
Class C: The 8 regions between neighboring Class A and Class B, containing p := (1 + (k-1))*(k-1)/2 = k(k-1)/2 = C(k, 2) stones each.
Then, for the two black stones:
1) AA (same ray): C(k, 2)
2) A*A (different rays): C(k, 2) + k, with 2 patterns (90 and 180 degrees rotation)
3) BB (same ray): C(k, 2)
4) B*B (different rays): C(k, 2) + k, with 2 patterns (90 and 180 degrees rotation)
5) CC (same region): C(p, 2)
6) C*C (different regions): C(p, 2) + p, with 6 patterns (90 and 180 degrees rotation and 4 reflections with 4 symmetry axes)
7) A*B: k * k, with 2 patterns (45 and 135 degrees)
8) A*C: k * p, with 4 patterns (0, 45, 90, 135 degrees)
9) B*C: k * p, with 4 patterns (0, 45, 90, 135 degrees)
We can see that A and B are essentially equivalent, so if we merge A and B, we might get similar representations as William and richyfourtytwo.
Therefore, the final result would be:
C(k, 2) + (C(k, 2) + k) * 2 + C(k, 2) + (C(k, 2) + k) * 2 + C(p, 2) + (C(p, 2) + p) * 6 + k * k * 2 + k * p * 4 + k * p * 4
= p + (p + k) * 2 + p + (p + k) * 2 + C(p, 2) + (C(p, 2) + p) * 6 + k * k * 2 + k * p * 4 + k * p * 4
= 6p + 4k + p(p-1)/2 + p(p+1)/2 * 6 + 2k^2 + 8kp
Here are examples of the computation for thefirst term (with white in the center)
n = 3, ans = 6 = 0 + 2 + 0 + 2 + 0 + 0 + 2 + 0 + 0
n = 5, ans = 44 = 1 + 6 + 1 + 6 + 0 + 6 + 8 + 8 + 8 (matching withresults from William and richyfourtytwo)
n = 7, ans = 159 = 3 + 12 + 3 + 12 + 3 + 36 + 18 + 36 + 36
n = 9, ans = 417 = 6 + 20 + 6 + 20 + 15 + 126 + 32 + 96 + 96
n = 11, ans = 905 = 10 + 30 + 10 + 30 + 45 + 330 + 50 + 200 + 200
n = 13, ans = 1731 = 15 + 42 + 15 + 42 + 105 + 720 + 72 + 360 + 360
n = 15, ans = 3024 = 21 + 56 + 21 + 56 + 210 + 1386 + 98 + 588 + 588
n = 17, ans = 4934 = 28 + 72 + 28 + 72 + 378 + 2436 + 128 + 896 + 896
n = 19, ans = 7632 = 36 + 90 + 36 + 90 + 630 + 3996 + 162 + 1296 + 1296
n = 21, ans = 11310 = 45 + 110 + 45 + 110 + 990 + 6210 + 200 + 1800 + 1800
n = 23, ans = 16181 = 55 + 132 + 55 + 132 + 1485 + 9240 + 242 + 2420 + 2420
n = 25, ans = 22479 = 66 + 156 + 66 + 156 + 2145 + 13266 + 288 + 3168 + 3168
n = 27, ans = 30459 = 78 + 182 + 78 + 182 + 3003 + 18486 + 338 + 4056 + 4056
n = 29, ans = 40397 = 91 + 210 + 91 + 210 + 4095 + 25116 + 392 + 5096 + 5096
n = 31, ans = 52590 = 105 + 240 + 105 + 240 + 5460 + 33390 + 450 + 6300 + 6300
n = 33, ans = 67356 = 120 + 272 + 120 + 272 + 7140 + 43560 + 512 + 7680 + 7680
n = 35, ans = 85034 = 136 + 306 + 136 + 306 + 9180 + 55896 + 578 + 9248 + 9248
n = 37, ans = 105984 = 153 + 342 + 153 + 342 + 11628 + 70686 + 648 + 11016 + 11016