An n-carbon A-aliphatic alkane is a tree without a root, consisting of n nodes, where the degree of each node is at most 4. For an example, see this for a list of some low n values.
I am looking for an algorithm to calculate the number of such n-carbon aliphatic alkanes, taking n into account.
I have seen this in stackexchange chemistry already. I also thought about dynamic programming, i.e. Building large graphs from smaller components, but I can not cope with re-reading the same isomers.
Clarification: Carbohydrates are just a metaphor. I don’t want to consider the instabilities of C16 and C17, and I don’t care about stereoisomers
source share