OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, 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.
EXAMPLE
For n = 14 the divisors of 14 are 1, 2, 7, 14, and the 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 = 41, so a(14) = 41.
Note that A187215(14) = 45.
MATHEMATICA
Table[Total@ Flatten@ NestWhileList[Differences, Divisors@ n, Length@ # > 1 &], {n, 63}] (* Michael De Vlieger, May 17 2016 *)
PROG
(PARI) a(n) = {my(d = divisors(n)); my(s = vecsum(d)); for (k=1, #d-1, d = vector(#d-1, n, d[n+1] - d[n]); s += vecsum(d); ); s; } \\ Michel Marcus, May 16 2016
CROSSREFS
KEYWORD
sign
AUTHOR
Omar E. Pol, May 15 2016
EXTENSIONS
More terms from Michel Marcus, May 16 2016
STATUS
approved