OFFSET
0,4
COMMENTS
Inspired by the Japanese puzzle of the same name.
LINKS
Wikipedia, Heyawake.
FORMULA
For n > 4, a(n) >= A239072(n-4) + 2*n - 2.
EXAMPLE
For n=6, the painted cells could be A1, A3, A6, B5, C1, C3, D4, D6, E2, F1, F4, F6 (a(6)=12 cells in all, equal to the lower bound given in the Formula section):
#.#..#
....#.
#.#...
...#.#
.#....
#..#.#
For n=7, a(7) is equal to the lower bound 17. The unique solution comes from the A239072(3) = 5 painted cells enclosed into a frame of unpainted cells and then into the outer frame in which every other cell is painted, including the corners:
#.#.#.#
.......
#.#.#.#
...#...
#.#.#.#
.......
#.#.#.#
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Elliott Line, Mar 13 2014
EXTENSIONS
Some values corrected, incorrect values removed by Elliott Line, Aug 21 2014
a(16) and a(20) corrected by Elliott Line at the suggestion of Greg Malen, Sep 02 2020
Entry edited by Andrei Zabolotskii, Feb 28 2026. The terms need independent verification.
STATUS
approved
