login
Sum of the first coordinates of all pairs of prime divisors of n, (p,q), such that p <= q.
3

%I #15 Sep 18 2020 02:19:15

%S 0,2,3,2,5,7,7,2,3,9,11,7,13,11,11,2,17,7,19,9,13,15,23,7,5,17,3,11,

%T 29,17,31,2,17,21,17,7,37,23,19,9,41,19,43,15,11,27,47,7,7,9,23,17,53,

%U 7,21,11,25,33,59,17,61,35,13,2,23,23,67,21,29,23,71,7,73,41,11,23,25,25,79

%N Sum of the first coordinates of all pairs of prime divisors of n, (p,q), such that p <= q.

%C a(n)=n if n is prime. - _Robert Israel_, Sep 17 2020

%H Robert Israel, <a href="/A337246/b337246.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Sum_{p|n, q|n, p and q prime, p<=q} p.

%e a(6) = 7; There are 2 prime divisors of 6: {2,3}. If we list all of the ordered pairs (p,q) with p<=q, we get (2,2), (2,3) and (3,3). The sum of the first coordinates from each pair is 2 + 2 + 3 = 7.

%e a(10) = 9; There are 2 prime divisors of 10: {2,5}. If we list all of the ordered pairs (p,q) with p<=q, we get (2,2), (2,5) and (5,5). The sum of the first coordinates from each pair is 2 + 2 + 5 = 9.

%p f:= proc(n) local F, i,j;

%p F:= sort(convert(numtheory:-factorset(n),list),`>`);

%p add(i*F[i],i=1..nops(F))

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Sep 17 2020

%o (PARI) a(n) = my(vp = factor(n)[,1]~); sum(iq=1, #vp, sum(ip=1, iq, vp[ip])); \\ _Michel Marcus_, Aug 21 2020

%Y Cf. A064939, A337246.

%K nonn

%O 1,2

%A _Wesley Ivan Hurt_, Aug 20 2020