OFFSET
1,2
COMMENTS
a(p)=p if p is prime and records are A002093 (highly abundant numbers). - Robert G. Wilson v, Jun 07 2006
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
FORMULA
a(n) = Sum_{u|n, v|n, u<v} u*v.
Sum_{k=1..n} a(k) = zeta(3) * n^3 / 4 + O(n^2*log(n)^2). - Amiram Eldar, Dec 15 2023
EXAMPLE
|-------+------------------------------------------+---------------------|
|...n...|................divisors(n)...............|..s2(divisors.(n))...|
|-------+------------------------------------------+---------------------|
|...1...|....................1.....................|..........0..........|
|...2...|...................1,2....................|..........2..........|
|...3...|...................1,3....................|..........3..........|
|...4...|..................1,2,4...................|.........14..........|
|...5...|...................1,5....................|..........5..........|
|...6...|.................1,2,3,6..................|.........47..........|
MAPLE
a:= n-> (l-> add(add(l[i]*l[j], i=1..j-1), j=2..nops(l)))
(sort([numtheory[divisors](n)[]])):
seq(a(n), n=1..80); # Alois P. Heinz, Jun 25 2014
MATHEMATICA
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 *)
PROG
(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
(PARI) a(n)=(sigma(n)^2-sigma(n, 2))/2 \\ Charles R Greathouse IV, Mar 05 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, based on email from Neven Juric (neven.juric(AT)apis-it.hr), Jun 07 2006
STATUS
approved