OFFSET
1,5
LINKS
Peter Luschny, Table of n, a(n) for n = 1..87.
Peter Luschny, Table of n, a(n) for n = 88..100.
Brendan McKay, Isoclasses of simple graphs.
MAPLE
with(Iterator):
zee:=proc(L, n) local i;
mul(i^L[i]*L[i]!, i=1..n)
end proc:
E:=proc(L, n) local i, j;
1/2*add(add(igcd(i, j)*L[i]*L[j], i=1..n), j=1..n)
-1/2*add((i mod 2)*L[i], i=1..n)
end proc:
sgn:=proc(L, n) local i;
(-1)^(add(L[2*i], i=1..n/2) mod 2)
end proc:
A281003:= proc(n) local P, p;
P:=PartitionPartCount(n);
add(2^E(p, n)*sgn(p, n)/zee(p, n), p=P)
end proc:
seq(A281003(n), n=1..20); # Ira M. Gessel, Jun 09 2026
MATHEMATICA
(* This assumes you have Brendan McKay's files listing isoclasses of simple graphs (see link), and starts from a(2), as there is no graph1.g6 *)
Table[
Length@ Select[
Import["graph" <> ToString[i] <> ".g6"],
Function[g,
! AnyTrue[GroupElements[GraphAutomorphismGroup[g]],
Apply[Times, (-1)^(Length /@ First[#] - 1)] == -1 &]
]
],
{i, 2, 9}
]
PROG
(SageMath) # After Ira M. Gessel.
from sage.all import QQ, ZZ, Partitions, factorial, gcd
def A281003(n: int) -> int:
ans = QQ(0)
for p in Partitions(n):
p_dict = p.to_exp_dict()
parts_items = sorted(p_dict.items())
z = 1; e = 0; neg = False
for part, cnt in parts_items:
z *= (part ** cnt) * factorial(cnt)
if part & 1 == 0 and cnt & 1 != 0: neg = not neg
if part & 1 != 0: e -= cnt
e += part * (cnt * cnt)
for b_part, b_cnt in parts_items:
if b_part >= part: break
e += 2 * gcd(part, b_part) * cnt * b_cnt
h = 2 ** (e // 2) / z
ans = ans - h if neg else ans + h
return ZZ(ans)
print([A281003(n) for n in range(1, 21)]) # Peter Luschny, Jun 10 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Mariano Suárez-Álvarez, Jan 12 2017
EXTENSIONS
More terms from Ira M. Gessel, May 30 2019
STATUS
approved
