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.

A161700 a(n) is the sum of the elements on the antidiagonal of the difference table of the divisors of n.

This page as a plain text file.
%I A161700 #33 Feb 16 2025 08:33:10
%S A161700 1,3,5,7,9,13,13,15,19,17,21,28,25,21,41,31,33,59,37,21,53,29,45,39,
%T A161700 61,33,65,49,57,171,61,63,77,41,117,61,73,45,89,-57,81,309,85,105,167,
%U A161700 53,93,-80,127,61,113,133,105,321,173,183,125,65,117,-1039,121,69,155,127,201,333,133,189,149,-69,141,117,145,81,317,217,269
%N A161700 a(n) is the sum of the elements on the antidiagonal of the difference table of the divisors of n.
%C A161700 a(p^k) = p^(k+1) - (p-1)^(k+1) if p is prime. - _Robert Israel_, May 18 2016
%H A161700 Robert Israel, <a href="/A161700/b161700.txt">Table of n, a(n) for n = 1..10000</a>
%H A161700 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Divisor.html">Divisor</a>
%H A161700 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FiniteDifference.html">Finite Difference</a>
%H A161700 Reinhard Zumkeller, <a href="/A161700/a161700.txt">Enumerations of Divisors</a>
%F A161700 a(n) = EDP(n,tau(n)) with tau = A000005 and EDP(n,x) = interpolating polynomial for the divisors of n.
%F A161700 EDP(n,A000005(n) - 1) = n;
%F A161700 EDP(n,1) = A020639(n);
%F A161700 EDP(n,0) = 1;
%F A161700 EDP(n,k) = A027750(A006218(n-1)+k+1), 0<=k < A000005(n).
%e A161700 n=12: A000005(12)=6;
%e A161700 EDP(12,x) = (x^5 - 5*x^4 + 5*x^3 + 5*x^2 + 114*x + 120)/120 = A161701(x) is the interpolating polynomial for {(0,1),(1,2),(2,3),(3,4),(4,6),(5,12)},
%e A161700 {EDP(12,x): 0<=x<6} = {1, 2, 3, 4, 6, 12} = divisors of 12,
%e A161700 a(12) = EDP(12,6) = 28.
%e A161700 From _Peter Luschny_, May 18 2016: (Start)
%e A161700 a(40) = -57 because the sum of the elements on the antidiagonal of DTD(40) is -57.
%e A161700 The DTD(40) is:
%e A161700 [   1    2    4   5  8  10  20  40]
%e A161700 [   1    2    1   3  2  10  20   0]
%e A161700 [   1   -1    2  -1  8  10   0   0]
%e A161700 [  -2    3   -3   9  2   0   0   0]
%e A161700 [   5   -6   12  -7  0   0   0   0]
%e A161700 [ -11   18  -19   0  0   0   0   0]
%e A161700 [  29  -37    0   0  0   0   0   0]
%e A161700 [ -66    0    0   0  0   0   0   0]
%e A161700 (End)
%p A161700 f:= proc(n)
%p A161700 local D, nD;
%p A161700 D:= sort(convert(numtheory:-divisors(n),list));
%p A161700 nD:= nops(D);
%p A161700 CurveFitting:-PolynomialInterpolation([$0..nD-1],D, nD)
%p A161700 end proc:
%p A161700 map(f, [$1..100]); # _Robert Israel_, May 18 2016
%t A161700 a[n_] := (d = Divisors[n]; t = Table[Differences[d, k], {k, 0, lg = Length[d]}]; Sum[t[[lg - k + 1, k]], {k, 1, lg}]);
%t A161700 Array[a, 77] (* _Jean-François Alcover_, Jan 25 2018 *)
%o A161700 (Sage)
%o A161700 def A161700(n):
%o A161700     D = divisors(n)
%o A161700     T = matrix(ZZ, len(D))
%o A161700     for (m, d) in enumerate(D):
%o A161700         T[0, m] = d
%o A161700         for k in range(m-1, -1, -1) :
%o A161700             T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
%o A161700     return sum(T[k,len(D)-k-1] for k in range(len(D)))
%o A161700 print([A161700(n) for n in range(1,78)]) # _Peter Luschny_, May 18 2016
%Y A161700 Cf. A000012, A000027, A005408, A000124, A016813, A086514, A016921, A000125, A058331, A002522, A017281, A161701, A017533, A161702, A161703, A000127, A158057, A161704, A161705, A161706, A161707, A161708, A161709, A161710, A080856, A161711, A161712, A161713, A161714, A161715, A128470, A006261.
%Y A161700 Cf. A161856.
%K A161700 sign
%O A161700 1,2
%A A161700 _Reinhard Zumkeller_, Jun 17 2009, Jun 20 2009
%E A161700 New name from _Peter Luschny_, May 18 2016