The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A006967 Number of graceful permutations of length n.
(Formerly M3229)
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 (list; graph; refs; listen; history; text; internal format)



Also the number of graceful labelings of the path graph P_n. - Eric W. Weisstein, Mar 31 2020


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.


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.

Gheorghe Coserea, MiniZinc model for generating solutions.

Don Knuth, This program finds all of the nonisomorphic graceful labelings of the path P_n

Don Knuth, This program outputs ZDDL for all of the nonisomorphic graceful labelings of the path P_n

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


a(n) = n! - A084894(n). - Jon Perry, Jun 10 2003


(CWEB) programs by Don Knuth: see links above


Cf. A084894.

Sequence in context: A080007 A239649 A264190 * A296229 A322175 A298117

Adjacent sequences:  A006964 A006965 A006966 * A006968 A006969 A006970




N. J. A. Sloane


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



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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 23 07:08 EST 2021. Contains 340384 sequences. (Running on oeis4.)