OFFSET
1,2
COMMENTS
"Adjacent" is meant in the sense of von Neumann neighborhoods (4 neighbors for "interior" nodes, 3 resp. 2 for nodes on the borders resp. in the corners).
Or: Number of permutations of an n X n array, with each element moving exactly one horizontally or vertically and without 2-loops.
LINKS
Project Euler, Problem 393: Migrating ants.
EXAMPLE
For a 1 X 1 grid, there is no such permutation or possibility.
For a 2 X 2 grid, on has the clockwise and counterclockwise cyclic "permutation" of the 4 nodes. (It is not allowed to draw arrows between 2 pairs of nodes in horizontal or vertical sense since, e.g., the arrow from the first to the second node is the opposite of the arrow from the second to the first node.)
For a 3 X 3 grid, there is no possibility, neither for a 5 X 5 grid.
CROSSREFS
KEYWORD
nonn,more
AUTHOR
M. F. Hasler, Sep 13 2012
EXTENSIONS
Terms beyond a(5) computed by R. H. Hardin, Sep 15 2012
STATUS
approved