How many ways can one place (unlabelled) dominoes on a square chequerboard such that the number placed horizontally is equal to the number placed vertically?
The dominoes must align with, and may not protrude, the chequerboard and may not overlap.
This is OEIS sequence A330658, 1, 1, 1, 23, 1608, 371500, 328956227, 1126022690953, ...
Challenge
Given the side length of the chequerboard, \$n\$, produce the number of ways to arrange dominoes as described above, \$a(n)\$, in as few bytes as possible in your chosen programming language. Alternatively you may use any of the sequence defaults.
You do not have to handle \$n=0\$
If you're producing a list/generator/etc. it may start either:
1, 1, 23, 1608, ...
or,1, 1, 1, 23, 1608, ...
A Worked Example, \$n=3\$
There are \$23\$ ways to place an equal number of horizontal and vertical dominoes on a three by three board. Here they are represented as 0
where no dominoes lie and labelling cells where distinct dominoes lie as positive integers:
There is one way to place zero in each direction:
0 0 0
0 0 0
0 0 0
There are twenty ways to place one in each direction:
1 1 0 1 1 0 1 1 0 1 1 2 0 0 2 2 0 0 2 1 1 0 1 1 0 1 1 0 1 1
2 0 0 0 2 0 0 0 2 0 0 2 1 1 2 2 1 1 2 0 0 2 0 0 0 2 0 0 0 2
2 0 0 0 2 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 2 0 0 0 2
2 0 0 0 2 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 2 0 0 0 2
2 0 0 0 2 0 0 0 2 0 0 2 1 1 2 2 1 1 2 0 0 2 0 0 0 2 0 0 0 2
1 1 0 1 1 0 1 1 0 1 1 2 0 0 2 2 0 0 2 1 1 0 1 1 0 1 1 0 1 1
There are two ways to place two in each direction:
1 1 2 2 1 1
3 0 2 2 0 3
3 4 4 4 4 3
There are no ways to place more than two in each direction.
\$1+20+2=23 \implies a(3)=23\$