OFFSET
1,12
COMMENTS
This sequence is a weighted analog of A001055, summing a gcd-based weight over unordered factorizations obtained from partitions of the multiset of prime factors, where identical primes are treated as indistinguishable. Thus, groupings that differ only by permuting or by splitting equal prime factors into separate blocks are not counted separately.
For squarefree n, this coincides with the unordered factorizations counted by A001055.
LINKS
Felix Huber, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
For n = 60 the prime factor multiset is [2, 2, 3, 5]. The distinct partitions are grouped by block count.
1 block:
[2, 2, 3, 5].
2 blocks:
[2, 2, 3] | [5] with gcd(12, 5) = 1;
[2, 2, 5] | [3] with gcd(20, 3) = 1;
[2, 3, 5] | [2] with gcd(30, 2) = 2;
[2, 2] | [3, 5] with gcd(4, 15) = 1;
[2, 3] | [2, 5] with gcd(6, 10) = 2.
3 blocks:
[2, 2] | [3] | [5] with gcd(4, 3) = 1, gcd(4, 5) = 1, gcd(3, 5) = 1;
[2, 3] | [2] | [5] with gcd(6, 2) = 2, gcd(6, 5) = 1, gcd(2, 5) = 1;
[2, 5] | [2] | [3] with gcd(10, 2) = 2, gcd(10, 3) = 1, gcd(2, 3) = 1.
Summing all pairwise gcd contributions yields a(60) = 18.
MAPLE
A395033 := proc(n)
local a, f, i, j, l, p, r, x;
l := ifactors(n)[2];
if nops(l) <= 1 then return 0 end if;
p := [seq(seq(x[1], 1 .. x[2]), x in l)];
a := 0;
for r in combinat:-setpartition(p) do
f := [seq(mul(x, x in r[i]), i = 1 .. nops(r))];
a := a + add(add(gcd(f[i], f[j]), j = i + 1 .. nops(f)), i = 1 .. nops(f) - 1)
end do;
a
end proc:
seq(A395033(n), n = 1 .. 86);
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Huber, May 04 2026
STATUS
approved
