Number of Lobsters ------------------ Let P(x) be the generating function for the number of integer partitions. Case diameter>4 A lobster of diameter greater than 4 consists of an end cell followed by zero or more middle cells followed by an end cell. Reversals of the sequence are not considered distinct. An end cell consists of a rooted tree with height exactly 2 whilst a middle cell consists of a rooted tree with height at most 2. Let M(x) be the generating function for a middle cell. A rooted tree of height at most 2 can be split into zero or more child trees of height at most 1. The number of rooted trees on n nodes of height at most 1 is just 1. Therefore the number of rooted trees on n nodes of height at most 2 is just the number of integer partitions of n-1. M(x) = x*P(x). Let E(x) be the generating function for an end cell: The case of a rooted tree of height at most 1 needs to be excluded. E(x) = x*P(x) - x/(1-x) = x*(P(x) - 1/(1-x)). Let S(x) be the generating function for a sequence of middle cells: S(x) = 1/(1-M(x)). Let B(x) be the generating function for the number of lobsters of diameter > 4: B(x) = (E(x)^2 * S(x) + E(x^2) * S(x^2) * (1 + M(x))) / 2. Case diameter<=4 All trees with diameter at most 4 are lobsters. There is already a sequence for this: A058984. Let C(x) be the generating function for the number of lobsters of diameter <= 4: C(x) = x*P(x) - x^3/((1-x)^2*(1+x)). Overall formula Let A(x) be the generating function for the number of lobsters A(x) = B(x) + C(x) = x^2*((P(x) - 1/(1-x))^2/(1-x*P(x)) + (P(x^2) - 1/(1-x^2))*(1 + x*P(x))/(1-x^2*P(x^2)))/2 + x*P(x) - x^3/((1-x)^2*(1+x)).