%I M0350 #35 Oct 21 2023 01:14:46
%S 1,1,1,1,2,2,5,9,19,38,86,188,439,1026,2472,5997,14835,36964,93246,
%T 236922,607111,1565478,4062797,10599853,27797420,73224806,193709710,
%U 514406793,1370937140,3665714528,9831891555,26445886506,71325268179
%N Number of n-node trees with a forbidden limb of length 4.
%C A tree with a forbidden limb of length k is a tree where the path from any leaf inward hits a branching node or another leaf within k steps.
%D A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Alois P. Heinz, <a href="/A002990/b002990.txt">Table of n, a(n) for n = 0..1000</a>
%H A. J. Schwenk, <a href="/A002988/a002988.pdf">Letter to N. J. A. Sloane, Aug 1972</a>.
%H <a href="/index/Tra#trees">Index entries for sequences related to trees</a>
%F G.f.: 1 + B(x) + (B(x^2) - B(x)^2)/2 where B(x) is g.f. of A052327.
%F a(n) ~ c * d^n / n^(5/2), where d = 2.9224691962496551739365155005926..., c = 0.503471518908815272581177797536... . - _Vaclav Kotesovec_, Aug 25 2014
%p with(numtheory):
%p g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
%p `if`(d=4, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
%p end:
%p a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
%p g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
%p seq(a(n), n=0..40); # _Alois P. Heinz_, Jul 06 2014
%t g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 4, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2]-1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Feb 26 2015, after _Alois P. Heinz_ *)
%Y Cf. A002955, A002988, A002989, A002990, A002991, A002992.
%Y Cf. A052318, A052319, A052320.
%Y Cf. A052321, A052322, A052323, A052324, A052325, A052326.
%Y Cf. A052327, A052328, A052329.
%K nonn
%O 0,5
%A _N. J. A. Sloane_
%E More terms, formula and comments from _Christian G. Bower_, Dec 15 1999
|