login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A215852 Number of simple labeled graphs on n nodes with exactly 2 connected components that are trees or cycles. 3
1, 3, 19, 135, 1267, 15029, 218627, 3783582, 75956664, 1734309929, 44357222772, 1255715827483, 38971877812380, 1315634598619830, 47994245894462576, 1881406032047006812, 78870928008704884848, 3520953336130828001295, 166762291211479030734580 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

LINKS

Alois P. Heinz, Table of n, a(n) for n = 2..145

FORMULA

a(n) ~ c * n^(n-2), where c = 0.511564031298... . - Vaclav Kotesovec, Sep 07 2014

EXAMPLE

a(3) = 3:

.1 2.  .1-2.  .1 2.

.|. .  . . .  . / .

.3...  .3...  .3...

MAPLE

T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,

      `if`(n=0, 1, add(binomial(n-1, i)*T(n-1-i, k-1)*

      `if`(i<2, 1, i!/2 +(i+1)^(i-1)), i=0..n-k)))

    end:

a:= n-> T(n, 2):

seq(a(n), n=2..25);

MATHEMATICA

T[n_, k_]:=T[n, k]=If[k<0 || k>n, 0, If[n==0, 1, Sum[Binomial[n - 1, i] T[n - 1 - i, k - 1] If[i<2, 1, i!/2 + (i + 1)^(i - 1)], {i, 0, n - k}]]]; Table[T[n, 2], {n, 2, 50}] (* Indranil Ghosh, Aug 07 2017, after Maple *)

PROG

(Python)

from sympy.core.cache import cacheit

from sympy import binomial, factorial as f

@cacheit

def T(n, k): return 0 if k<0 or k>n else 1 if n==0 else sum([binomial(n - 1, i)*T(n - 1 - i, k - 1)*(1 if i<2 else f(i)/2 + (i + 1)**(i - 1)) for i in range(n - k + 1)])

def a(n): return T(n , 2)

print map(a, range(2, 51)) # Indranil Ghosh, Aug 07 2017, after maple code

CROSSREFS

Column k=2 of A215861.

The unlabeled version is A215982.

Sequence in context: A091346 A305550 A035086 * A105797 A278189 A221297

Adjacent sequences:  A215849 A215850 A215851 * A215853 A215854 A215855

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Aug 25 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 28 23:08 EST 2020. Contains 332351 sequences. (Running on oeis4.)