Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #27 Nov 30 2022 08:29:08
%S 1,3,4,5,6,12,8,15,11,18,12,20,14,24,24,29,18,33,20,30,32,36,24,60,29,
%T 42,40,40,30,72,32,63,48,54,48,55,38,60,56,90,42,96,44,60,66,72,48,
%U 116,55,87,72,70,54,120,72,120,80,90,60,120,62,96,88,125,84,144,68,90,96
%N SENSigma: Multiplicative with a(p^e) = p*(p^e-1)/(p-1) - (-1)^e.
%C Original definition:
%C SENSigma(n) = (-1)^((Sum_i r_i)+Omega(n))*Sum_{d|n} (-1)^((Sum_j Max(r_j))+Omega(d))*d =Product_i (Sum_{1<=s_i<=r_i} p_i^s_i)+(-1)^(r_i+1) where n=Product_i p_i^r_i, d=Product_j p_j^r_j, p_j^max(r_j) is the largest power of p_j dividing n.
%C SEN stands for Signed by Exponents of prime factors and Number of prime factors.
%C 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.
%C Here is another version of the definition. Let n=Product_i p_i^e_i, PREX_{p}(n)=e_k, p=p_k. Example: n = 2^4*3^2*5, PREX_{2}(n)=4. Then SENSigma(m) = (-1)^((Sum_i r_i) + Omega(m))*Sum_{d|m} (-1)^((Sum_j PREX_{p_j}(m)) + Omega(d))*d = Product_i (Sum_{1 <= s_i <= r_i} p_i^s_i) + (-1)^(r_i+1) where m = Product_i p_i^r_i, d = Product_j p_j^r_j.
%C The function is not completely multiplicative: If p is a prime, a(p) = p+1 but a(p^2) = p + p^2 - 1. - _R. J. Mathar_, Nov 20 2010
%H Antti Karttunen, <a href="/A125139/b125139.txt">Table of n, a(n) for n = 1..10000</a>
%F SENSigma(n) = Product_i (p_i^(r_i+1) - p_i)/(p_i-1) + (-1)^(r_i+1).
%F Sum_{k=1..n} a(k) ~ c * n^2, where c = (zeta(4)/2) * Product_{p prime} (1 + 1/p^2 - 2/p^4 + 2/p^5) = 0.76715211405... . - _Amiram Eldar_, Nov 30 2022
%e If n=240, d=12 then 2^max(r_j) = 2^max(2) = 2^4, 3^max(r_j) = 3^max(1) = 3^1. SENSigma(240) = (-1+2+4+8+16)*(1+3)*(1+5).
%p A125139 := proc(n) local ifs,i,a,r,p ; ifs := ifactors(n)[2] ; a := 1 ; if n > 1 then 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 ; fi ; RETURN(a) ; end: for n from 1 to 80 do printf("%d, ",A125139(n)) ; od ; # _R. J. Mathar_, May 18 2007
%t f[p_, e_] := p*(p^e-1)/(p-1) - (-1)^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Nov 30 2022 *)
%o (PARI) A125139(n)={ prod( i=1, #n=factor(n)~, my( r=n[2,i], p=n[1,i]); p*(p^r-1)/(p-1)-(-1)^r ) }
%Y Cf. A013662.
%K nonn,mult
%O 1,2
%A _Yasutoshi Kohmoto_, Jan 12 2007, Jan 29 2007
%E More terms from _R. J. Mathar_, May 18 2007