login
A299113
Number of rooted identity trees with 2n+1 nodes.
3
1, 1, 3, 12, 52, 247, 1226, 6299, 33209, 178618, 976296, 5407384, 30283120, 171196956, 975662480, 5599508648, 32334837886, 187737500013, 1095295264857, 6417886638389, 37752602033079, 222861754454841, 1319834477009635, 7839314017612273, 46688045740233741
OFFSET
0,3
LINKS
FORMULA
a(n) = A004111(2n+1).
EXAMPLE
a(2) = 3:
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+1):
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 + 1];
Array[a, 30, 0] (* Jean-François Alcover, May 30 2019, from Maple *)
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+1)
print([a(n) for n in range(31)]) # Indranil Ghosh, Mar 02 2018
CROSSREFS
Bisection of A004111 (odd part).
Sequence in context: A348479 A000256 A274396 * A124202 A138269 A228771
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 02 2018
STATUS
approved