OFFSET
4,2
COMMENTS
Any labeled tree on n vertices admits a unique Prüfer code. A graceful labeling of a tree on n vertices assigns the labels {0,1,...,n-1} to the vertices such that the induced edge labels (absolute differences of endpoint labels) are exactly {1,2,...,n-1}.
A path graph on n vertices is a tree with exactly two vertices of degree 1 and all other vertices of degree 2.
REFERENCES
Douglas B. West, Introduction to Graph Theory, Pearson Education Pte. Ltd, 2002, page 81.
LINKS
Igor Blokhin, Graph Theory (Python repository).
EXAMPLE
a(4)=1, meaning that among all graceful Prüfer codes (of length 2) of path graph on vertices {0,1,2,3}, there are 1 code ending in 0: (2, 0). This code correspond to the graph 1--2--0--3.
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Igor Blokhin, Mar 21 2026
EXTENSIONS
a(15) from Igor Blokhin, Mar 31 2026
a(16)-a(28) from Bert Dobbelaere, Apr 19 2026
STATUS
approved
