login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216678 On an n X n grid, number of ways to draw arrows between adjacent nodes such that each node has one outgoing and one incoming arrow, of which the one is not the opposite of the other (i.e., without 2-loops). 3

%I #21 Dec 10 2015 04:13:01

%S 0,2,0,88,0,207408,0,22902801416,0,112398351350823112,0,

%T 24075116871728596710774372

%N On an n X n grid, number of ways to draw arrows between adjacent nodes such that each node has one outgoing and one incoming arrow, of which the one is not the opposite of the other (i.e., without 2-loops).

%C "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).

%C Or: Number of permutations of an n X n array, with each element moving exactly one horizontally or vertically and without 2-loops.

%H Project Euler, <a href="http://projecteuler.net/problem=393">Problem 393: Migrating ants</a>.

%e For a 1 X 1 grid, there is no such permutation or possibility.

%e 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.)

%e For a 3 X 3 grid, there is no possibility, neither for a 5 X 5 grid.

%Y See A216675 for the same problem without the additional restriction.

%Y Cf. A216796, A216797, A216798, A216799, A216800 for more general n X k grids.

%K nonn,more

%O 1,2

%A _M. F. Hasler_, Sep 13 2012

%E Terms beyond a(5) computed by _R. H. Hardin_, Sep 15 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)