This document presents algorithms for generating all possible tree codes (representations of trees as sequences of integers) for a given number of edges. It establishes several arithmetic properties of tree generation codes, including that adding certain integer sequences to existing tree codes will always produce new valid tree codes. Theorems are provided to construct tree codes by appending, repeating, or transforming parts of existing tree codes in ways that preserve the tree structure. An algorithm is also described for checking if a given graceful graph code represents a tree using the Prüfer code technique.