|
|
A167939
|
|
The number of connected subgraphs of the complete graph with n nodes.
|
|
1
|
|
|
1, 3, 10, 64, 973, 31743, 2069970, 267270040, 68629753649, 35171000942707, 36024807353574290, 73784587576805254664, 302228602363365451957805, 2475873310144021668263093215, 40564787336902311168400640561098, 1329227697997490307154018925966130320
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The problem originated from Attila Szabss.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 3, consider the complete graph with nodes A, B and C. a(3) = 10, the 10 connected subgraphs being: A, B, C, AB, AC, BC, AB+AC, AB+BC, AC+BC, AB+AC+BC.
|
|
MATHEMATICA
|
nn = 25;
g[z_]:= Sum[2^Binomial[n, 2] z^n/n!, {n, 0, nn}];
Drop[CoefficientList[Series[Exp[z]*Log[g[z]], {z, 0, nn}], z]*Range[0, nn]!, 1] (* Geoffrey Critzer, Nov 23 2016 *)
|
|
PROG
|
(Haskell)
import Data.Function (fix)
import Data.List (transpose)
a :: [Integer]
a = scanl1 (+) . (!! 1) . transpose . fix $ map ((1:) . zipWith (*) (scanl1 (*) l) . zipWith poly (scanl1 (+) l)) . scanl (flip (:)) [] . zipWith (zipWith (*)) pascal where l = iterate (2*) 1
-- the Pascal triangle
pascal :: [[Integer]]
pascal = iterate (\l -> zipWith (+) (0: l) l) (1: repeat 0)
-- evaluate a polynomial at a given value
poly :: (Num a) => a -> [a] -> a
poly t = foldr (\e i -> e + t*i) 0
(Magma)
m:=35;
f:= func< x | (&+[2^Binomial(j, 2)*x^j/Factorial(j): j in [0..m+2]]) >;
R<x>:=PowerSeriesRing(Rationals(), m);
Coefficients(R!(Laplace( Exp(x)*Log(f(x)) ))); // G. C. Greubel, Sep 08 2023
(SageMath)
m=35
def f(x): return sum(2^binomial(j, 2)*x^j/factorial(j) for j in range(m+3))
P.<x> = PowerSeriesRing(QQ, prec)
return P( exp(x)*log(f(x)) ).egf_to_ogf().list()
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Peter Divianszky (divip(AT)aszt.inf.elte.hu), Nov 15 2009
|
|
STATUS
|
approved
|
|
|
|