OFFSET
1
COMMENTS
a(1) = 0 by convention.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
EXAMPLE
Sum_{n > 0} p(n) = s(1) + s(2) - s(11) + s(3) - s(21) + s(4) + s(111) - s(31) + s(5) + s(211) + s(6) - s(41) - s(1111) + s(7) + s(8) + s(311) + ...
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
hookQ[n_]:=MatchQ[DeleteCases[FactorInteger[n], {2, _}], {}|{{_, 1}}];
Table[If[hookQ[n], (-1)^(Total[primeMS[n]]-Max[primeMS[n]]), 0], {n, 2, 100}]
PROG
(PARI)
A000265(n) = (n/2^valuation(n, 2));
A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i, 2] * primepi(f[i, 1]))); }
A061395(n) = if(n>1, primepi(vecmax(factor(n)[, 1])), 0);
A304438(n) = if(1==n, 0, my(o=A000265(n)); if(((o>1)&&!isprime(o)), 0, (-1)^(A056239(n)-A061395(n)))); \\ Antti Karttunen, Sep 30 2018
CROSSREFS
KEYWORD
sign
AUTHOR
Gus Wiseman, Sep 14 2018
EXTENSIONS
More terms from Antti Karttunen, Sep 30 2018
STATUS
approved