OFFSET
0,3
COMMENTS
A permutation p[1]...p[n] of {1,...n} is graceful if the n-1 differences |p[j+1] -p[j]| are distinct. It is rooted if, in addition, |p[j+1] - p[j]| = k < n-1 implies that either |p[j] - p[j-1]| > k or |p[j+2] - p[j+1]| > k.
LINKS
Don Knuth, Table of n, a(n) for n = 0..173
EXAMPLE
For n = 6 the a(6) = 12 solutions are 162534, 251643, 316254, 325164, 342516, 346152, 431625, 435261, 452613, 461523, 526134, 615243.
CROSSREFS
KEYWORD
nonn
AUTHOR
Don Knuth, Dec 20 2020
STATUS
approved