OFFSET
1,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
The divisors of 10 are 1, 2, 5, 10 and the sum of the squares of the distances between successive divisors = (2-1)^2 + (5-2)^2 + (10-5)^2 = 35. Hence a(10) = 35.
MATHEMATICA
f[n_] := Module[{d, l, s, i}, d = Divisors[n]; l = Length[d]; s = 0; For[i = 1, i < l, i++, s = s + (d[[i + 1]] - d[[i]])^2]; s]; Table[f[n], {n, 1, 100}]
Table[Total[Differences[Divisors[n]]^2], {n, 60}] (* Harvey P. Dale, Apr 10 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Dec 19 2002
STATUS
approved