OFFSET
1,3
COMMENTS
A "cycle" means a rook-connected closed path of squares.
The proof of this result is given in the Links section.
a(n+1) is very close to A239231(n); more precisely, the difference is the sequence 1,0,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1.
In other words, the feedback vertex set (or decycling) number of the n X n grid graph. - Eric W. Weisstein, Jan 27 2026
LINKS
Giedrius Alkauskas, Maximal subsets of n X n board without cycles, 2022.
Eric Weisstein's World of Mathematics, Feedback Vertex Set Number.
Eric Weisstein's World of Mathematics, Grid Graph.
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,1,-2,1).
FORMULA
a(n) = ceiling(n^2/3 - n/6 + 4/3) - ceiling(n/2) for n >= 3.
From Stefano Spezia, Jun 02 2022: (Start)
G.f.: x^2*(1 + x^2 + 2*x^4 - x^5 + x^6 - x^7 + x^8)/((1 - x)^3*(1 + x)*(1 - x + x^2)*(1 + x + x^2)).
a(n) = 2*a(n-1) - a(n-2) + a(n-6) - 2*a(n-7) + a(n-8) for n > 2. (End)
a(n) = n^2 - A360921(n). - Andrew Howroyd, Jan 27 2026
EXAMPLE
For n = 2, a(2) = 1, since removing any unit square from the 2 X 2 board leaves no cycles.
For n = 5, a(5) = 6 removed unit squares can be arranged as follows:
x****
*x*x*
**x**
*x*x*
*****
MATHEMATICA
Table[Piecewise[{{n - 1, n == 1 || n == 2}}, Ceiling[n^2/3 - n/6 + 4/3] - Ceiling[n/2]], {n, 20}] (* Eric W. Weisstein, Jan 27 2026 *)
Join[{0, 1}, LinearRecurrence[{2, -1, 0, 0, 0, 1, -2, 1}, {2, 4, 6, 10, 13, 18, 22, 28}, 20]] (* Eric W. Weisstein, Jan 27 2026 *)
CoefficientList[Series[-x (1 + x^2 + 2 x^4 - x^5 + x^6 - x^7 + x^8)/((-1 + x)^3 (1 + x) (1 - x + x^2) (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Jan 27 2026 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Giedrius Alkauskas, Jun 02 2022
STATUS
approved
