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.

A299098 Number of rooted identity trees with 2n nodes.

This page as a plain text file.
%I A299098 #24 May 02 2020 16:07:39
%S A299098 0,1,2,6,25,113,548,2770,14426,76851,416848,2294224,12780394,71924647,
%T A299098 408310668,2335443077,13446130438,77863375126,453203435319,
%U A299098 2649957419351,15558520126830,91687179000949,542139459641933,3215484006733932,19125017153077911
%N A299098 Number of rooted identity trees with 2n nodes.
%H A299098 Alois P. Heinz, <a href="/A299098/b299098.txt">Table of n, a(n) for n = 0..1253</a>
%F A299098 a(n) = A004111(2*n).
%e A299098 a(3) = 6:
%e A299098    o     o       o       o       o         o
%e A299098    |     |       |      / \     / \       / \
%e A299098    o     o       o     o   o   o   o     o   o
%e A299098    |     |      / \    |       |   |    / \
%e A299098    o     o     o   o   o       o   o   o   o
%e A299098    |    / \    |       |       |       |
%e A299098    o   o   o   o       o       o       o
%e A299098    |   |       |       |
%e A299098    o   o       o       o
%e A299098    |
%e A299098    o
%p A299098 with(numtheory):
%p A299098 b:= proc(n) option remember; `if`(n<2, n, add(b(n-k)*add(
%p A299098       b(d)*d*(-1)^(k/d+1), d=divisors(k)), k=1..n-1)/(n-1))
%p A299098     end:
%p A299098 a:= n-> b(2*n):
%p A299098 seq(a(n), n=0..30);
%t A299098 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 A299098 a[n_] := b[2*n];
%t A299098 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Jun 18 2018, after _Alois P. Heinz_ *)
%o A299098 (Python)
%o A299098 from sympy import divisors
%o A299098 from sympy.core.cache import cacheit
%o A299098 @cacheit
%o A299098 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 A299098 def a(n): return b(2*n)
%o A299098 print([a(n) for n in range(31)]) # _Indranil Ghosh_, Mar 02 2018, after Maple program
%Y A299098 Bisection of A004111 (even part).
%Y A299098 Cf. A100034, A299039, A299113.
%K A299098 nonn
%O A299098 0,3
%A A299098 _Alois P. Heinz_, Feb 02 2018