OFFSET
1,2
COMMENTS
First differs from A273103 at a(14). - Omar E. Pol, May 15 2016
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 2n, if n is prime.
a(2^k) = A125128(k+1), k >= 0. - Omar E. Pol, May 15 2016
EXAMPLE
For n = 14 the divisors of 14 are 1, 2, 7, 14, and the absolute difference triangle of the divisors is
1 . 2 . 7 . 14
. 1 . 5 . 7
. . 4 . 2
. . . 2
The sum of all elements of the triangle is 1 + 2 + 7 + 14 + 1 + 5 + 7 + 4 + 2 + 2 = 45, so a(14) = 45.
MAPLE
with(numtheory):
DD:= l-> [seq(abs(l[i]-l[i-1]), i=2..nops(l))]:
a:= proc(n) local l;
l:= sort([divisors(n)[]], `>`);
add(j, j=[seq((DD@@i)(l)[], i=0..nops(l)-1)]);
end:
seq(a(n), n=1..100); # Alois P. Heinz, Aug 02 2011
MATHEMATICA
Table[Total@ Flatten@ NestWhileList[Abs@ Differences@ # &, Divisors@ n, Length@ # > 1 &], {n, 56}] (* Michael De Vlieger, May 18 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Aug 02 2011
EXTENSIONS
More terms from Alois P. Heinz, Aug 02 2011
Edited by Omar E. Pol, May 19 2016
STATUS
approved