login
The number of labeled directed graphs (with self loops allowed) on n nodes of at most two colors, where no edge connects nodes of distinct colors.
2

%I #23 Jan 27 2021 10:08:27

%S 1,4,40,1216,140800,68583424,138280960000,1127848949579776,

%T 36911566343372800000,4836368016228644955357184,

%U 2535397941156689968365568000000,5316967764024635660932200566930538496,44601618005626665627415483458173009920000000

%N The number of labeled directed graphs (with self loops allowed) on n nodes of at most two colors, where no edge connects nodes of distinct colors.

%H Alois P. Heinz, <a href="/A197356/b197356.txt">Table of n, a(n) for n = 0..35</a>

%F E.g.f.: A(x)^2 where A(x) is the e.g.f. for A002416.

%F a(n) = 2^(n^2) * Sum_{k=0..n} C(n,k)*4^(k*(k-n)). - _Alois P. Heinz_, Oct 14 2011

%p a:= n-> 2^(n^2) * add(binomial(n,k) * 4^(k*(k-n)), k=0..n):

%p seq(a(n), n=0..20); # _Alois P. Heinz_, Oct 14 2011

%t a=Sum[2^(n^2)x^n/n!,{n,0,20}]; Range[0,20]!CoefficientList[Series[a^2,{x,0,20}],x]

%o (PARI) A197356(n)=2^(n^2)*sum(k=0,n,binomial(n,k)*4^(k*(k-n))) \\ _M. F. Hasler_, Oct 14 2011

%Y Cf. A002416.

%K nonn

%O 0,2

%A _Geoffrey Critzer_, Oct 14 2011