login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Second elementary symmetric function of divisors of n.
5

%I #32 Dec 15 2023 06:19:37

%S 0,2,3,14,5,47,7,70,39,97,11,287,13,163,158,310,17,533,19,609,262,343,

%T 23,1375,155,457,390,1043,29,1942,31,1302,542,733,502,3185,37,895,718,

%U 2945,41,3358,43,2247,1859,1267,47,5983,399,2697,1142,3017,53,5150,1006

%N Second elementary symmetric function of divisors of n.

%C a(p)=p if p is prime and records are A002093 (highly abundant numbers). - _Robert G. Wilson v_, Jun 07 2006

%H Alois P. Heinz, <a href="/A119616/b119616.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)

%F a(n) = Sum_{u|n, v|n, u<v} u*v.

%F a(n) = (sigma_1(n)^2-sigma_2(n))/2, cf. A000203, A001157. - _Vladeta Jovovic_, Jun 07 2006

%F Sum_{k=1..n} a(k) = zeta(3) * n^3 / 4 + O(n^2*log(n)^2). - _Amiram Eldar_, Dec 15 2023

%e |-------+------------------------------------------+---------------------|

%e |...n...|................divisors(n)...............|..s2(divisors.(n))...|

%e |-------+------------------------------------------+---------------------|

%e |...1...|....................1.....................|..........0..........|

%e |...2...|...................1,2....................|..........2..........|

%e |...3...|...................1,3....................|..........3..........|

%e |...4...|..................1,2,4...................|.........14..........|

%e |...5...|...................1,5....................|..........5..........|

%e |...6...|.................1,2,3,6..................|.........47..........|

%p a:= n-> (l-> add(add(l[i]*l[j], i=1..j-1), j=2..nops(l)))

%p (sort([numtheory[divisors](n)[]])):

%p seq(a(n), n=1..80); # _Alois P. Heinz_, Jun 25 2014

%t f[n_] := Block[{d = Divisors@n}, Sum[ d[[u]]*d[[v]], {v, 2, Length@d}, {u, v - 1}]]; Array[f, 55] (* _Robert G. Wilson v_ *)

%o (PARI) a(n)=my(d=divisors(n));sum(i=1,#d-1,sum(j=i+1,#d,d[i]*d[j])) \\ _Charles R Greathouse IV_, Mar 05 2013

%o (PARI) a(n)=(sigma(n)^2-sigma(n,2))/2 \\ _Charles R Greathouse IV_, Mar 05 2013

%Y Cf. A002093, A000203, A001157, A002117, A067692.

%Y Column k=2 of A224381.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, based on email from Neven Juric (neven.juric(AT)apis-it.hr), Jun 07 2006