cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A161857 a(n) is the sum of the first column of the difference table of the divisors of n.

This page as a plain text file.
%I A161857 #24 Aug 04 2025 17:37:35
%S A161857 1,2,3,3,5,4,7,4,7,4,11,4,13,4,11,5,17,12,19,-3,13,4,23,-4,21,4,15,3,
%T A161857 29,38,31,6,17,4,31,-5,37,4,19,-42,41,76,43,15,27,4,47,-66,43,-4,23,
%U A161857 21,53,68,43,34,25,4,59,-434,61,4,9,7,49,60,67,33,29,-54,71,24,73,4,59,39,69
%N A161857 a(n) is the sum of the first column of the difference table of the divisors of n.
%C A161857 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
%H A161857 Reinhard Zumkeller, <a href="/A161857/b161857.txt">Table of n, a(n) for n = 1..1000</a>
%F A161857 a(n) = SUM(A161856(A006218(n-1)+i): 1<=i<=A000005(n)), n>1.
%e A161857 The DTD of 65 is:
%e A161857 [  1   5  13  65]
%e A161857 [  4   8  52]
%e A161857 [  4  44]
%e A161857 [ 40]
%e A161857 sigma(65) = 1 + 5 + 13 + 65 = 84.
%e A161857 a(65) = 1 + 4 + 4 + 40 = 49.
%t A161857 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 *)
%t A161857 Table[Total[Table[Differences[Divisors[k],n],{n,0,DivisorSigma[0,k]-1}][[;;,1]]],{k,80}] (* _Harvey P. Dale_, Aug 04 2025 *)
%o A161857 (Sage)
%o A161857 def A161857(n):
%o A161857     D = divisors(n)
%o A161857     T = matrix(ZZ, len(D))
%o A161857     for (m, d) in enumerate(D):
%o A161857         T[0, m] = d
%o A161857         for k in range(m-1, -1, -1) :
%o A161857             T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
%o A161857     return sum(T.column(0))
%o A161857 print([A161857(n) for n in range(1,78)]) # _Peter Luschny_, May 18 2016
%Y A161857 Row sums of A161856.
%Y A161857 Cf. A000005, A000203, A006218.
%K A161857 sign
%O A161857 1,2
%A A161857 _Reinhard Zumkeller_, Jun 20 2009
%E A161857 New name from _Peter Luschny_, May 18 2016