login
A299098
Number of rooted identity trees with 2n nodes.
4
0, 1, 2, 6, 25, 113, 548, 2770, 14426, 76851, 416848, 2294224, 12780394, 71924647, 408310668, 2335443077, 13446130438, 77863375126, 453203435319, 2649957419351, 15558520126830, 91687179000949, 542139459641933, 3215484006733932, 19125017153077911
OFFSET
0,3
LINKS
FORMULA
a(n) = A004111(2*n).
EXAMPLE
a(3) = 6:
o o o o o o
| | | / \ / \ / \
o o o o o o o o o
| | / \ | | | / \
o o o o o o o o o
| / \ | | | |
o o o o o o o
| | | |
o o o o
|
o
MAPLE
with(numtheory):
b:= proc(n) option remember; `if`(n<2, n, add(b(n-k)*add(
b(d)*d*(-1)^(k/d+1), d=divisors(k)), k=1..n-1)/(n-1))
end:
a:= n-> b(2*n):
seq(a(n), n=0..30);
MATHEMATICA
b[n_] := b[n] = If[n<2, n, Sum[b[n-k]*Sum[b[d]*d*(-1)^(k/d + 1), {d, Divisors[k]}], {k, 1, n-1}]/(n-1)];
a[n_] := b[2*n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 18 2018, after Alois P. Heinz *)
PROG
(Python)
from sympy import divisors
from sympy.core.cache import cacheit
@cacheit
def b(n): return n if n<2 else sum([b(n-k)*sum([b(d)*d*(-1)**(k//d+1) for d in divisors(k)]) for k in range(1, n)])//(n-1)
def a(n): return b(2*n)
print([a(n) for n in range(31)]) # Indranil Ghosh, Mar 02 2018, after Maple program
CROSSREFS
Bisection of A004111 (even part).
Sequence in context: A366236 A276277 A355862 * A229042 A269484 A014277
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 02 2018
STATUS
approved