OFFSET
0,4
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..50
Musa Demirci, Ugur Ana, and Ismail Naci Cangul, Properties of Characteristic Polynomials of Oriented Graphs, Proc. Int'l Conf. Adv. Math. Comp. (ICAMC 2020) Springer, see p. 61.
Chathura Kankanamge, Multiple Continuous Subgraph Query Optimization Using Delta Subgraph Queries, Master Maths Thesis, Univ. of Waterloo, 2018.
Eric Weisstein's World of Mathematics, Oriented Graph
FORMULA
Inverse Euler transform of A001174. - Andrew Howroyd, Nov 03 2017
MATHEMATICA
permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
edges[v_] := Sum[GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total @ Quotient[v - 1, 2];
a1174[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p], {p, IntegerPartitions[n]}]; s/n!];
b = Array[a1174, 15];
mob[m_, n_] := If[Mod[m, n] == 0, MoebiusMu[m/n], 0];
EULERi[b_] := Module[{a, c, i, d}, c = {}; For[i = 1, i <= Length[b], i++, c = Append[c, i*b[[i]] - Sum[c[[d]]*b[[i - d]], {d, 1, i - 1}]]]; a = {}; For[i = 1, i <= Length[b], i++, a = Append[a, (1/i)*Sum[mob[i, d]*c[[d]], {d, 1, i}]]]; Return[a]];
PROG
(Python)
from fractions import Fraction
from functools import cache
from itertools import combinations
from math import factorial, gcd, prod
from sympy import divisors
from sympy.functions.combinatorial.numbers import mobius
from sympy.utilities.iterables import partitions
def A086345(n): return sum(mobius(d)*c(n//d) for d in divisors(n, generator=True))//n if n else 1
@cache
def b(n): return sum(Fraction(3**(sum(v1*v2*gcd(t1, t2) for (t1, v1), (t2, v2) in combinations(p.items(), 2))+sum((q-1>>1)*r+(q*r*(r-1)>>1) for q, r in p.items())), prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))
@cache
def c(n): return n*b(n)-sum(c(k)*b(n-k) for k in range(1, n)) # Chai Wah Wu, Jul 15 2024. Updated by Hunter Hogan, Oct 02 2025.
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Jul 16 2003
EXTENSIONS
More terms from Vladeta Jovovic, Jul 19 2003
a(0)=1 prepended by Andrew Howroyd, Sep 09 2018
STATUS
approved
