login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A274935 Number of n-node unlabeled forests with two connected components. 4

%I #20 Aug 15 2017 13:53:31

%S 1,1,2,2,4,6,12,22,46,93,205,451,1039,2422,5803,14075,34757,86761,

%T 219235,558984,1438033,3726535,9723913,25525112,67375200,178723358,

%U 476264352,1274448596,3423494617,9229075121,24961969420,67721961268,184255962564,502658875034,1374713691841,3768527610094,10353602341313

%N Number of n-node unlabeled forests with two connected components.

%C One of the components may be empty (the null graph): a(n) = A000055(n) + A274937(n). - _R. J. Mathar_, Aug 15 2017

%H Alois P. Heinz, <a href="/A274935/b274935.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: [A(x)^2 + A(x^2)]/2 where A(x) is the o.g.f. for A000055.

%p with(numtheory):

%p b:= proc(n) option remember; `if`(n<2, n, (add(add(d*

%p b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))

%p end:

%p g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*

%p b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))

%p end:

%p a:= proc(n) option remember; add(g(j)*g(n-j), j=0..n/2)-

%p `if`(n::odd, 0, (t-> t*(t-1)/2)(g(n/2)))

%p end:

%p seq(a(n), n=0..40); # _Alois P. Heinz_, Jul 20 2016

%t b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/ (n-1)];

%t g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}]+If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];

%t a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 0, n/2}]-If[OddQ[n], 0, Function[t, t*(t-1)/2][g[n/2]]];

%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Mar 15 2017, after _Alois P. Heinz_ *)

%Y Cf. A000055, A274936, A274937, A274938. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

%K nonn

%O 0,3

%A _N. J. A. Sloane_, Jul 19 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:22 EDT 2024. Contains 371967 sequences. (Running on oeis4.)