OFFSET
1,5
LINKS
Eric Weisstein's World of Mathematics, Giraffe Graph.
Eric Weisstein's World of Mathematics, Maximal Independent Vertex Set.
MATHEMATICA
Table[Length@FindIndependentVertexSet[RelationGraph[Sort[Abs[Subtract[##]]] == {1, 4} &, Tuples[Range[n], 2]], Infinity, All], {n, 7}]
PROG
(Python)
from networkx import empty_graph, complement, find_cliques
def A367458(n):
G = empty_graph((i, j) for i in range(n) for j in range(n))
G.add_edges_from(((i, j), (i+k, j+l)) for i in range(n) for j in range(n) for (k, l) in ((1, 4), (1, -4), (-1, 4), (-1, -4), (4, 1), (4, -1), (-4, 1), (-4, -1)) if 0<=i+k<n and 0<=j+l<n)
return sum(1 for c in find_cliques(complement(G))) # Chai Wah Wu, Jan 27 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Eric W. Weisstein, Jan 26 2024
STATUS
approved