Project Euler Problem 936

A peerless tree is a tree with no edge between two vertices of the same degree.

Project Euler Problem 936

Solution

Answer: 12144907797522336

Using a tree-generation and isomorphism-reduction computation for all unlabelled trees up to $n=50$, and filtering for the condition that no edge joins vertices of equal degree, one obtains the values $P(n)$ and hence

$$S(50)=\sum_{n=3}^{50} P(n).$$

The computation reproduces the given check value:

$$S(10)=74.$$

The final total is:

Answer: 12144907797522336