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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A338986 Number of rooted graceful permutations of length n. 2
 1, 1, 2, 4, 4, 8, 12, 4, 12, 12, 16, 20, 28, 12, 12, 60, 16, 20, 40, 48, 48, 52, 44, 76, 52, 72, 80, 68, 60, 136, 148, 152, 72, 216, 116, 140, 116, 184, 408, 176, 404, 288, 412, 440, 356, 384, 464, 256, 704, 444, 812, 560, 348, 904, 800, 1088, 628, 716, 868 (list; graph; refs; listen; history; text; internal format)
 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 A006967 counts all graceful permutations. If n > 2, a(n) = 4*A338988(n). Sequence in context: A227333 A223317 A027131 * A319803 A055946 A130124 Adjacent sequences:  A338983 A338984 A338985 * A338987 A338988 A338989 KEYWORD nonn AUTHOR Don Knuth, Dec 20 2020 STATUS approved

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

Last modified January 23 21:06 EST 2022. Contains 350515 sequences. (Running on oeis4.)