OFFSET
1,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
László Tóth, Alternating Sums Concerning Multiplicative Arithmetic Functions, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.1.
FORMULA
a(n) = c_1 * n^(3/2) + c_2 * n^(4/3) + O(n^(6/5)), where c_1 = (zeta(3/2)/(3*zeta(3))) * ((9-12*sqrt(2))/23) * Product_{p prime} (1 + (sqrt(p)-1)/(p*(p-sqrt(p)+1))) = -0.40656281796860400941..., and c_2 = (zeta(4/3)/(4*zeta(2))) * ((2^(5/3)-3*2^(1/3)-1)/(2^(5/3)-2^(1/3)+1)) * Product_{p prime} (1 + (p^(1/3)-1)/(p*(p^(2/3)-p^(1/3)+1))) = -0.52513876339565998938... (Tóth, 2017).
MATHEMATICA
f[p_, e_] := If[e == 1, 1, p^e]; pfp[n_] := Times @@ f @@@ FactorInteger[n]; pfp[1] = 1; Accumulate[Array[(-1)^(# + 1) * pfp[#] &, 100]]
PROG
(PARI) pfp(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] == 1, 1, f[i, 1]^f[i, 2])); }
lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * pfp(k); print1(s, ", "))};
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Amiram Eldar, Mar 05 2024
STATUS
approved