OFFSET
1,3
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Up to sign, a(n) is the number of acyclic spanning subgraphs of an undirected n-cycle whose component sizes are the prime indices of n.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
Table[If[n==1, 0, With[{tot=Total[Cases[FactorInteger[n], {p_, k_}:>k*PrimePi[p]]]}, (-1)^(tot-PrimeOmega[n])*tot*(PrimeOmega[n]-1)!/(Times@@Factorial/@FactorInteger[n][[All, 2]])]], {n, 30}]
PROG
(PARI) C(sig)={my(S=Set(sig)); my(n=vecsum(sig)); if(n==0, 0, n*(#sig-1)!*(-1)^(n-#sig)/prod(k=1, #S, (#select(t->t==S[k], sig))!))}
a(n)={my(f=factor(n)); C(if(n==1, [], concat(vector(#f~, i, primepi(f[i, 1]) * vector(f[i, 2], j, 1)))))} \\ Andrew Howroyd, Oct 15 2025
CROSSREFS
The unsigned version (except with a(1) = 1) is A319225.
The transition from p to e by Heinz numbers is A321752.
The transition from p to h by Heinz numbers is A321754.
Different orderings with and without signs and first terms are A115131, A210258, A263916, A319226, A330415.
KEYWORD
sign
AUTHOR
Gus Wiseman, Dec 14 2019
STATUS
approved
