The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
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
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([a(n) for n in 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
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 9 07:31 EDT 2024. Contains 373229 sequences. (Running on oeis4.)