OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Rafael Jakimczuk, Two Topics in Number Theory: Sum of Divisors of the Primorial and Sum of Squarefree Parts, International Mathematical Forum, Vol. 12, No. 7 (2017), pp. 331-338.
FORMULA
Sum_{k, a(k) <= x} ~ c*x^2 + o(x^2), where c = (3/Pi^2) * Sum_{k>=1} f(k)/k^4 = 0.32103327852028541131..., and f(k) = Product_{p prime | k} (p/(p+1)) (Jakimczuk, 2017).
Sum_{k=1..n} a(k) ~ c'*x^2 + o(x^2), where c' = c / (A065465)^2 = 0.41313480468422995583... .
MATHEMATICA
s[n_] := If[AllTrue[(f = FactorInteger[n])[[;; , 2]], # == 1 || EvenQ[#] &], i = Position[f[[;; , 2]], 1] // Flatten; Times @@ f[[i, 1]], Nothing]; Array[s, 100]
PROG
(PARI) s(n) = {my(f = factor(n), ans = 1); for(k = 1, #f~, if(f[k, 2] > 1 && f[k, 2]%2, ans = 0)); if(ans, ans = prod(k = 1, #f~, if(f[k, 2] == 1, f[k, 1], 1))) };
for(n = 1, 100, if(s(n) > 0, print1(s(n), ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Oct 09 2022
STATUS
approved