"Tic-Tac-Toe" is a game played on a 3x3 grid where 2 players alternate taking turns placing tokens (X's and O's) onto the grid. The game is completed when one player has reached 3 of their same tokens in a row. (Note: a "play" in this case is used in the chess sense that a single person has placed a piece.)
For the time being, I ignored cases where a "win" would stop the game to simply get the legal boards for each play. After I figure out $f(x,k)$ below, I will then subtract those out.
It is immediately clear that there are $9!$ total positions but this ignores legality, rotation, and reflection. Also, it is apparent that the symmetry of the board is the dihedral group of order 8. Using this information and a simple python script gives:
$$ \begin{array}{|| c | c c c c | c |c ||} \hline & {Orbits} & & & \\ \hline Plays & 1 & 2 & 4 & 8 & Unique & Total \\ \hline 0 & 1 & 0 & 0 & 0 & 1 & 1 \\ \hline 1 & 1 & 0 & 2 & 0 & 3 & 9 \\ \hline 2 & 0 & 0 & 6 & 6 & 12 & 72 \\ \hline 3 & 0 & 2 & 10 & 26 & 38 & 252 \\ \hline 4 & 0 & 2 & 24 & 82 & 108 & 756 \\ \hline 5 & 0 & 2 & 30 & 142 & 174 & 1260 \\ \hline 6 & 0 & 0 & 36 & 192 & 228 & 1680 \\ \hline 7 & 0 & 2 & 30 & 142 & 174 & 1260 \\ \hline 8 & 2 & 0 & 17 & 70 & 89 & 630 \\ \hline 9 & 2 & 0 & 11 & 10 & 23 & 126 \\ \hline \end{array} $$ For example, the fourth play has 108 unique boards which can be broken down to 2 unique boards that have an orbit of 2 (4 boards total), 24 unique boards that have an orbit of 4 (so 96 boards total) and then 82 unique boards that have an orbit of 8 (656 boards total) which gives a grand total of 756 total boards.
Realizing that the total "legal" boards for each play $x$ is $ \binom{9}{x} \binom{x}{\lfloor \frac{x}{2} \rfloor} $, the function $f(x,k)$ would then represent the number of unique boards that have an orbit of $2^k$ for each play $x$ as shown below.
$$ \binom{9}{x} \binom{x}{\lfloor \frac{x}{2} \rfloor} = \sum_{k=0}^{3} f(x,k) \: 2^k $$
So my question is: How do I invert that sum to solve for $f(x,k)$?