OFFSET
1,6
LINKS
FORMULA
EXAMPLE
a(30) = 62 because 30 has 8 divisors {1, 2, 3, 5, 6, 10, 15, 30} among which 5 are nonprime squarefree {1, 6, 10, 15, 30} therefore 1 + 6 + 10 + 15 + 30 = 62.
MATHEMATICA
nmax = 90; Rest[CoefficientList[Series[x/(1 - x) + Sum[Sign[PrimeNu[k] - 1] MoebiusMu[k]^2 k x^k/(1 - x^k), {k, 2, nmax}], {x, 0, nmax}], x]]
Table[Total[Select[Divisors[n], #1 == 1 || (SquareFreeQ[#1] && PrimeNu[#1] > 1) &]], {n, 90}]
PROG
(PARI) Vec((x/(1 - x)) + sum(k=2, 90, sign(omega(k) - 1) * moebius(k)^2 * k * x^k/(1 - x^k)) + O(x^91)) \\ Indranil Ghosh, Mar 21 2017
(Python)
from sympy import divisors
from sympy.ntheory.factor_ import core
def a(n): return sum([i for i in divisors(n) if core(i)==i and isprime(i)==0]) # Indranil Ghosh, Mar 21 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Mar 20 2017
STATUS
approved