login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A006967
Number of graceful permutations of length n.
(Formerly M3229)
10
1, 1, 2, 4, 4, 8, 24, 32, 40, 120, 296, 648, 1328, 3200, 9912, 25592, 55920, 143192, 510696, 1451296, 3497344, 10451824, 38570704, 118914992, 315235872, 1014824752, 3963684496, 13166130152, 37846301904, 130507967088, 533318630936, 1884550215976, 5800121391936
OFFSET
0,3
COMMENTS
Also the number of graceful labelings of the path graph P_n. - Eric W. Weisstein, Mar 31 2020
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
H. S. Wilf and N. Yoshimura, Ranking rooted trees and a graceful application, in Discrete Algorithms and Complexity (Proceedings of the Japan-US joint seminar, 1986, Kyoto, Japan), edited by D. Johnson, T. Nishizeki, A. Nozaki and H. S. Wilf, Academic Press, NY, 1987, pp. 341-350.
LINKS
Michal Adamaszek, Don Knuth, Table of n, a(n) for n = 0..41, a(41) from Don Knuth.
M. Adamaszek, Efficient enumeration of graceful permutations, arXiv:math/0608513 [math.CO], 2006.
Gheorghe Coserea, Solutions for n=5.
Gheorghe Coserea, Solutions for n=6.
Md Masbaul Alam Polash, M. A. Hakim Newton, Abdul Sattar, Constraint-directed search for all-interval series, Constraints, July 2017, Volume 22, Issue 3, pp 403-431. See page 426.
Eric Weisstein's World of Mathematics, Graceful Labeling
Eric Weisstein's World of Mathematics, Graceful Permutation
Eric Weisstein's World of Mathematics, Path Graph
J. Wodlinger, Costas arrays, Golomb rulers and wavelength isolation sequence pairs, M.S. Dissertation, Math. Dept., Simon Fraser University, Spring 2012; - From N. J. A. Sloane, Oct 15 2012
FORMULA
a(n) = n! - A084894(n). - Jon Perry, Jun 10 2003
PROG
(CWEB) @ See Knuth link.
CROSSREFS
Cf. A084894.
Sequence in context: A080007 A239649 A264190 * A296229 A322175 A298117
KEYWORD
nonn,nice,hard,changed
EXTENSIONS
n=2 term corrected June 1996
a(11)-a(20) from Robert Aldred and Brendan McKay
More terms from Michal Adamaszek (aszek(AT)mimuw.edu.pl), Aug 22 2006
a(0)=1 prepended by Alois P. Heinz, Jan 31 2020
a(41)=1032009647743958000 from Don Knuth, Sep 10 2020
STATUS
approved