OFFSET
1,3
COMMENTS
SEP stands for Signed by Exponents of Prime factors.
By "Max(r_j)" I mean the following: If d|m, d=p^e*q^f, m=p^x*q^y*r^z then Max(e)=x, Max(f)=y.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
a(n) = Product_i (-1)^r_i + ((p_i^(r_i+1)-p_i)/(p_i-1)), where p_i and r_i range over the primes and their exponents in the prime factorization of n.
a(n) = Product_{p^e || n} (-1)^e + ((p^(1+e)-p)/(p-1)), where p and e range over the primes and their exponents in the prime factorization of n.
From Amiram Eldar, Sep 18 2023: (Start)
Dirichlet g.f.: zeta(s-1) * zeta(2*s) * Product_{p prime} (1 - 1/p^s + 2/p^(2*s-1)).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} (1 - (p^2 - 2*p - 1)/(p^4 - 1)) = 0.48777088716109463306... . (End)
EXAMPLE
If n = 240, d = 12 then 2^max(r_j) = 2^max(2) = 2^4, 3^max(r_j) = 3^max(1) = 3^1, SEPSigma(240) = (1+2+4+8+16)*(-1+3)*(-1+5) = 248.
MAPLE
A125140 := proc(n) local ifs, i, a, r, p ; ifs := ifactors(n)[2] ; a := 1 ; for i from 1 to nops(ifs) do r := op(2, op(i, ifs)) ; p := op(1, op(i, ifs)) ; a := a*(p*(1-p^r)/(1-p)+(-1)^r) ; od ; RETURN(a) ; end: for n from 1 to 80 do printf("%d, ", A125140(n)) ; od ; # R. J. Mathar, Jun 07 2007
MATHEMATICA
f[p_, e_] := (p^(e+1) - p)/(p - 1) + (-1)^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
PROG
(PARI) A125140(n) = { my(f=factor(n), p, e); prod(k=1, #f~, p = f[k, 1]; e = f[k, 2]; ((-1)^e) + (((p^(e+1))-p) / (p-1))); }; \\ Antti Karttunen, Feb 21 2022
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Yasutoshi Kohmoto, Jan 12 2007, Jan 29 2007
EXTENSIONS
More terms from R. J. Mathar, Jun 07 2007
Formula clarified by Antti Karttunen, Feb 21 2022
STATUS
approved