OFFSET
3,7
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}. This triangle, read by rows, gives T(n,k), the number of Prüfer codes of gracefully labeled trees on n vertices whose first element equals k, where 0 <= k <= n-1.
REFERENCES
Douglas B. West, Introduction to Graph Theory, Pearson Education Pte. Ltd, 2002, page 81.
LINKS
Igor Blokhin, Table of n, a(n) for n = 3..104
Igor Blokhin, Graceful Prüfer codes (Python repository).
EXAMPLE
For n=4 the row is [1,0,1,2], meaning that among all graceful Prüfer codes (of length 2) on vertices {0,1,2,3}, there are 1 code starting in 0, no codes starting in 1, 1 code starting in 2, and 2 code starting in 3.
Triangle T(n,k), 0 <= k <= n-1 (each row sums to A033472(n)):
n=3: 1 0 1
n=4: 1 0 1 2
n=5: 2 1 2 1 6
n=6: 5 4 4 4 5 18
n=7: 18 15 13 12 14 25 67
n=8: 63 62 47 47 55 76 101 301
CROSSREFS
KEYWORD
nonn,hard,more,tabf
AUTHOR
Igor Blokhin, Feb 10 2026
STATUS
approved
