OFFSET
1,3
COMMENTS
a(n) is the number of distinct isomorphism classes of connected nonnegative posets of size n and Dynkin type A.
A poset I of size n is nonnegative if its symmetric Gram matrix G_I = (C_I + C_I^T)/2 is positive semidefinite, where C_I is the n X n relation matrix of the poset (with entries c_ij = 1 if i <= j, and 0 otherwise). Every such poset has a unique Dynkin type, defined as the simply-laced Dynkin diagram associated with the Z-congruence class of G_I (Simson, 2013).
For proof, see Gąsiorek (2022).
REFERENCES
D. Simson, A Coxeter-Gram classification of positive simply laced edge-bipartite graphs, SIAM Journal on Discrete Mathematics, 27 (2013), 827-854.
LINKS
Marcin Gąsiorek, Structure of non-negative posets of Dynkin type A_n, arXiv:2205.15032 [math.CO], 2022.
FORMULA
a(n) = (1/(2*n)) * Sum_{d|n} (2^(n/d) * phi(d)) + floor(2^(n-2) + 2^(ceiling(n/2 - 2)) - (n+1)/2), where phi is the Euler totient function (A000010).
MAPLE
anum := proc(n::integer)
local d, term1, term2;
if n < 1 then
return 0;
end if;
term1 := iquo(add(2^iquo(n, d) * NumberTheory:-Totient(d), d in NumberTheory:-Divisors(n)), (2 * n));
term2 := floor(2^(n - 2) + 2^ceil(n / 2 - 2) - (n + 1) / 2);
return term1 + term2;
end proc;
MATHEMATICA
anum[n_Integer?Negative] := 0;
anum[0] := 0;
anum[n_Integer?Positive] := DivisorSum[n, 2^(n/#) EulerPhi[#] &]/(2 n) + Floor[(2^n + 2^Ceiling[n/2])/4 - (n + 1)/2];
PROG
(Python)
from sympy import Integer, Rational, divisors, totient, ceiling, floor
def anum(n: int) -> int:
if n < 1:
return 0
n = Integer(n)
term1 = sum(2**(n // d) * totient(d) for d in divisors(n)) // (2 * n)
term2 = floor(2**(n - 2) + 2**ceiling(n / 2 - 2) - Rational(n + 1, 2))
return int(term1 + term2)
(SageMath)
def anum(n):
if n < 1:
return 0
term1 = sum(2^(n // d) * euler_phi(d) for d in divisors(n) ) // (2 * n)
term2 = floor(2^(n - 2) + 2^ceil(n/2 - 2) - (n + 1)/2)
return term1 + term2
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Marcin Gąsiorek, Jun 05 2026
STATUS
approved
