If a row (or column) is fixed and on this row there exist two adjacent squares that have the same color, then the whole board is fixed. There are 2^n-2 such cases.
The only two cases that are not covered are:
black, white, black, white, bwbwbw...;
or white, black, white, black, wbwb...
For these two cases, their adjacent row (or column) must be
black, white, black, white, bwbwbw...;
or white, black, white, black, wbwb...
So there are 2^n such cases.
And the total is 2^(n+1)-2.