cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A299113 Number of rooted identity trees with 2n+1 nodes.

This page as a plain text file.
%I A299113 #17 May 02 2020 16:40:12
%S A299113 1,1,3,12,52,247,1226,6299,33209,178618,976296,5407384,30283120,
%T A299113 171196956,975662480,5599508648,32334837886,187737500013,
%U A299113 1095295264857,6417886638389,37752602033079,222861754454841,1319834477009635,7839314017612273,46688045740233741
%N A299113 Number of rooted identity trees with 2n+1 nodes.
%H A299113 Alois P. Heinz, <a href="/A299113/b299113.txt">Table of n, a(n) for n = 0..1253</a>
%F A299113 a(n) = A004111(2n+1).
%e A299113 a(2) = 3:
%e A299113    o     o       o
%e A299113    |     |      / \
%e A299113    o     o     o   o
%e A299113    |    / \    |
%e A299113    o   o   o   o
%e A299113    |   |       |
%e A299113    o   o       o
%e A299113    |
%e A299113    o
%p A299113 with(numtheory):
%p A299113 b:= proc(n) option remember; `if`(n<2, n, add(b(n-k)*add(
%p A299113       b(d)*d*(-1)^(k/d+1), d=divisors(k)), k=1..n-1)/(n-1))
%p A299113     end:
%p A299113 a:= n-> b(2*n+1):
%p A299113 seq(a(n), n=0..30);
%t A299113 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)];
%t A299113 a[n_] := b[2*n + 1];
%t A299113 Array[a, 30, 0] (* _Jean-François Alcover_, May 30 2019, from Maple *)
%o A299113 (Python)
%o A299113 from sympy import divisors
%o A299113 from sympy.core.cache import cacheit
%o A299113 @cacheit
%o A299113 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)
%o A299113 def a(n): return b(2*n+1)
%o A299113 print([a(n) for n in range(31)]) # _Indranil Ghosh_, Mar 02 2018
%Y A299113 Bisection of A004111 (odd part).
%Y A299113 Cf. A100427, A299098.
%K A299113 nonn
%O A299113 0,3
%A A299113 _Alois P. Heinz_, Feb 02 2018