A212715 Number of nonintersecting (or self-avoiding) knight paths joining opposite corners of an n X n grid.
1, 0, 2, 138, 88920, 752404294
Offset: 1
Examples
When n=3 this is the number of ways to move a knight from a1 to c3 without occupying any cell twice. Only two paths: a1-b3-c1-a2-c3 and a1-c2-a3-b1-c3. When n=8 this is the number of ways to move a knight from a1 to h8 without occupying any cell twice.
Crossrefs
Programs
-
C
#include
int WIDTH, HEIGHT; char grid[16][16]; int calc_ways(int x, int y) { if (!((unsigned)x