OFFSET
1,2
COMMENTS
Let DTD(n) denote the difference table of the divisors of n. The sum of the first row of DTD(n) is sigma(n) = A000203(n). a(n) is the sum of the first column of DTD(n). - Peter Luschny, May 18 2016
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
EXAMPLE
The DTD of 65 is:
[ 1 5 13 65]
[ 4 8 52]
[ 4 44]
[ 40]
sigma(65) = 1 + 5 + 13 + 65 = 84.
a(65) = 1 + 4 + 4 + 40 = 49.
MATHEMATICA
a[n_] := Module[{dd = Divisors[n]}, If[n==1, 1, Sum[Differences[dd, k][[1]], {k, 0, Length[dd]-1}]]]; Array[a, 100] (* Jean-François Alcover, Jun 17 2019 *)
PROG
(Sage)
def A161857(n):
D = divisors(n)
T = matrix(ZZ, len(D))
for (m, d) in enumerate(D):
T[0, m] = d
for k in range(m-1, -1, -1) :
T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
return sum(T.column(0))
print([A161857(n) for n in range(1, 78)]) # Peter Luschny, May 18 2016
CROSSREFS
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Jun 20 2009
EXTENSIONS
New name from Peter Luschny, May 18 2016
STATUS
approved