OFFSET
0,6
COMMENTS
For n=0, there are no rooted trees at all, per A000081.
For n>=1, by omitting the root vertex, a(n) is the number of rooted forests of n-1 vertices in which all leaves are at odd depths down from the forest roots. This includes the empty forest (no vertices at all).
For n>=1, a(n) is the number of rooted hypertrees of weight n-1. Each vertex (leaf or not) at an even depth is a hypervertex. The root is the hypertree root. Each hyperedge is the set of vertices surrounding an odd depth vertex, so that the weight (total hyperedge cardinalities) is the number of edges in the tree (n-1).
A337090 counts trees with all leaves at odd depths. The forests interpretation here is those odd trees assembled to make odd forests so that this sequence is shift-up of the Euler transform of A337090. In turn A337090 is shift-up of the Euler transform of the present sequence (except for treatment of the empty forest) so that it's convenient to calculate them together term by term.
LINKS
Kevin Ryde, Table of n, a(n) for n = 0..600
FORMULA
EXAMPLE
For n=5 vertices there are a(5) = 3 rooted trees in which all leaves are at even depths.
* * * depth=0, root
| / \ |
* * * *
/|\ | | |
* * * * * * depth=2, even
|
*
|
* depth=4, even
PROG
(PARI) \\ Return a vector of vec[n]=a(n) for n=1..len inclusive (so a(0)=0 omitted).
a_vector(len) = {
my(evens=vector(len), ec=vector(len)); evens[1]=1;
my(odds=vector(len), oc=vector(len));
for(n=1, len-1,
ec[n] = sumdiv(n, d, d*evens[d]);
oc[n] = sumdiv(n, d, d*odds[d]);
evens[n+1] = sum(k=1, n, oc[k]*evens[n+1-k]) /n;
odds[n+1] = (ec[n] + sum(k=1, n-1, ec[k]* odds[n+1-k])) /n);
evens; } \\ or instead "odds" is A337090
CROSSREFS
KEYWORD
nonn
AUTHOR
Kevin Ryde, Aug 15 2020
STATUS
approved