OFFSET
1,2
COMMENTS
After the first 7 terms, the first differences are terms of A052928: for n >= 8, a(n) - a(n-1) = A052928(n-1).
The increase in differences going from an even n to an odd n, but not from an odd n to an even n, is due to the differing optimal layouts for odd vs. even n values. See example section for a(7) and a(8).
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
For n > 6, a(n) = floor(((n-1)^2)/2).
G.f.: x^2*(2 - x + 2*x^3 - 2*x^4 - x^5 + 2*x^6 + 2*x^7 - 2*x^8)/((1 - x)^3*(1 + x)). - Stefano Spezia, Jul 05 2022
EXAMPLE
Examples for n=2 to n=6 have been included as they do not follow the general formula.
.
A solution illustrating a(2)=2:
+-----+
| B B |
| W W |
+-----+
.
A solution illustrating a(3)=3:
+-------+
| . . . |
| B B W |
| W W B |
+-------+
.
A solution illustrating a(4)=6:
+---------+
| B B . W |
| W W . B |
| B B . W |
| W W . B |
+---------+
.
A solution illustrating a(5)=10:
+-----------+
| W B W B W |
| W B W B W |
| . . . . . |
| B W B W B |
| B W B W B |
+-----------+
.
A solution illustrating a(6)=14:
+-------------+
| B B W W B B |
| W W B B W W |
| B . . . . B |
| W . . . . W |
| B B W W B B |
| W W B B W W |
+-------------+
.
Examples for n=7 and n=8 are provided, as while both follow the same formula, the layout for even values of n differs from the layout for odd values of n (related to the fact that, for even values of n, the floor function rounds down a non-integer value).
.
A solution illustrating a(7)=18:
+---------------+
| B B B B B B B |
| B B B B B B B |
| B . B . B . B |
| . . . . . . . |
| W . W . W . W |
| W W W W W W W |
| W W W W W W W |
+---------------+
.
A solution illustrating a(8)=24:
+-----------------+
| B B B B B B B B |
| B B B B B B B B |
| B B B B B B B B |
| . . . . . . . . |
| . . . . . . . . |
| W W W W W W W W |
| W W W W W W W W |
| W W W W W W W W |
+-----------------+
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Aaron Khan, Jul 04 2022
STATUS
approved