login
If the prime factorization of n is n = Product_{p|n} p^b(p,n) (p = distinct prime divisors of n, each b(p,n) is a positive integer), then a(n) is (Sum_{p|n} p^b(p,n)) taken mod (Sum_{p|n} p).
1

%I #20 Nov 20 2017 22:03:08

%S 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1,0,2,0,0,0,1,0,0,0,2,0,0,0,0,0,0,

%T 0,3,0,0,0,6,0,0,0,2,6,0,0,4,0,6,0,2,0,4,0,6,0,0,0,2,0,0,6,0,0,0,0,2,

%U 0,0,0,2,0,0,4,2,0,0,0,0,0,0,0,2,0,0,0,6,0,6,0,2,0,0,0,0,0,6,6,1

%N If the prime factorization of n is n = Product_{p|n} p^b(p,n) (p = distinct prime divisors of n, each b(p,n) is a positive integer), then a(n) is (Sum_{p|n} p^b(p,n)) taken mod (Sum_{p|n} p).

%H Antti Karttunen, <a href="/A127268/b127268.txt">Table of n, a(n) for n = 1..65537</a>

%F a(n) = A008475(n) mod A008472(n), if n > 1. - _R. J. Mathar_, Nov 01 2007

%e 40 = 2^3 *5^1. So a(40) = 2^3 + 5^1 (mod (2+5)) = 13 (mod 7) = 6.

%p A008475 := proc(n) local ifs ; if n =1 then 0; else ifs := ifactors(n)[2] ; add(op(1,i)^op(2,i),i =ifs) ; fi ; end: A008472 := proc(n) local ifs ; if n =1 then 0; else ifs := ifactors(n)[2] ; add(op(1,i),i =ifs) ; fi ; end: A127268 := proc(n) if n = 1 then 0 ; else A008475(n) mod A008472(n) ; fi ; end: seq(A127268(n),n=1..100) ; # _R. J. Mathar_, Nov 01 2007

%t Array[Mod[Total@ Apply[Power, # /. {1, 1} -> {0, 1}, 1], Total[#[[All, 1]] ]] &@ FactorInteger[#] &, 100] (* _Michael De Vlieger_, Nov 20 2017 *)

%o (PARI)

%o A008472(n) = vecsum(factor(n)[, 1]); \\ This function from _M. F. Hasler_, Jul 18 2015

%o A008475(n) = { my(f=factor(n)); vecsum(vector(#f~,i,f[i,1]^f[i,2])); };

%o A127268(n) = if(1==n,0, (A008475(n) % A008472(n))); \\ _Antti Karttunen_, Nov 20 2017

%Y Cf. A008472, A008475.

%K nonn

%O 1,12

%A _Leroy Quet_, Mar 27 2007

%E More terms from _R. J. Mathar_, Nov 01 2007