OFFSET
0,3
COMMENTS
Equals first differences of A000273.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..60
FORMULA
O.g.f.: A(x)*(1-x) where A(x) is o.g.f. for A000273. - Geoffrey Critzer, Oct 09 2012
MAPLE
b:= proc(n, i, l) `if`(n=0 or i=1, 1/n!*2^((p-> add(p[j]-1+add(
igcd(p[k], p[j]), k=1..j-1)*2, j=1..nops(p)))([l[], 1$n])),
add(b(n-i*j, i-1, [l[], i$j])/j!/i^j, j=0..n/i))
end:
a:= n-> b(n$2, [])-`if`(n=0, 0, b(n-1$2, [])):
seq(a(n), n=0..16); # Alois P. Heinz, Sep 04 2019
MATHEMATICA
Needs["Combinatorica`"];
nn=15; s=Sum[NumberOfDirectedGraphs[n]x^n, {n, 0, nn}]; CoefficientList[Series[s (1-x), {x, 0, nn}], x] (* Geoffrey Critzer, Oct 09 2012 *)
Join[{1}, Table[GraphPolynomial[n, x, Directed] /. x -> 1, {n, 0, 15}] // Differences] (* Jean-François Alcover, Feb 04 2015 *)
PROG
(Python)
from itertools import combinations
from math import prod, factorial, gcd
from fractions import Fraction
from sympy.utilities.iterables import partitions
def A053598(n): return int(sum(Fraction(1<<sum(p[r]*p[s]*gcd(r, s)<<1 for r, s in combinations(p.keys(), 2))+sum(r*(q*r-1) for q, r in p.items()), prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n)))-int(sum(Fraction(1<<sum(p[r]*p[s]*gcd(r, s)<<1 for r, s in combinations(p.keys(), 2))+sum(r*(q*r-1) for q, r in p.items()), prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n-1))) if n else 1 # Chai Wah Wu, Jul 05 2024
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Vladeta Jovovic, Apr 10 2000
STATUS
approved