login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Irregular triangle read by rows: T(n,k) = sum of the elements of the k-th row of the difference table of the divisors of n.
4

%I #35 Apr 02 2017 03:21:17

%S 1,3,1,4,2,7,3,1,6,4,12,5,2,2,8,6,15,7,3,1,13,8,4,18,9,4,0,12,10,28,

%T 11,5,4,3,1,14,12,24,13,6,-2,24,14,8,8,31,15,7,3,1,18,16,39,17,8,6,4,

%U 12,20,18,42,19,9,4,3,-11,32,20,12,8,36,21,10,-6,24,22,60,23,11,8,6,3,4,-12,31,24,16,42,25,12,-8

%N Irregular triangle read by rows: T(n,k) = sum of the elements of the k-th row of the difference table of the divisors of n.

%C Row 2^k gives the first k+1 positive terms of A000225 in decreasing order, k >= 0.

%C If n is prime then row n contains only two terms: n+1 and n-1.

%C First differs from A274531 at a(41).

%C For n = p^k, T(n, 1) = n - 1, T(n, n) = (p - 1)^k. a(A006218(n - 1) + 1) = T(n, 0), a(A006218(n)) = T(n, t-1) where t is the number of divisors of n. - _David A. Corneth_, Jun 18 2016

%C Let D_n(m, c) be the k-th element in row m. The divisors of n are in row m = 0. Let t be the number of divisors of n. Then T(n, k) = D_n(k - 1, t-1) - D_n(k - 1, 0). - _David A. Corneth_, Jun 25 2016

%C For n in A187204, the last term of the n-th row is 0. - _Michel Marcus_, Apr 02 2017

%e Triangle begins:

%e 1;

%e 3, 1;

%e 4, 2;

%e 7, 3, 1;

%e 6, 4;

%e 12, 5, 2, 2;

%e 8, 6;

%e 15, 7, 3, 1;

%e 13, 8, 4;

%e 18, 9, 4, 0;

%e 12, 10;

%e 28, 11, 5, 4, 3, 1;

%e 14, 12;

%e 24, 13, 6, -2;

%e 24, 14, 8, 8;

%e 31, 15, 7, 3, 1;

%e 18, 16;

%e 39, 17, 8, 6, 4, 12;

%e 20, 18;

%e 42, 19, 9, 4, 3, -11;

%e 32, 20, 12, 8;

%e 36, 21, 10, -6;

%e 24, 22;

%e 60, 23, 11, 8, 6, 3, 4, -12;

%e 31, 24, 16;

%e 42, 25, 12, -8;

%e ...

%e For n = 14 the divisors of 14 are 1, 2, 7, 14, and the difference triangle of the divisors is

%e 1, 2, 7, 14;

%e 1, 5, 7;

%e 4, 2;

%e -2;

%e The row sums give [24, 13, 6, -2] which is also the 14th row of the irregular triangle.

%e In the first row, the last element is 14, the first is 1. So the sum of the second row is 14 - 1 is 13. Similarly, the sum of the third row is 7 - 1 = 6, and of the last row, 2 - 4 = -2. - _David A. Corneth_, Jun 25 2016

%t Map[Total, Table[NestWhileList[Differences, Divisors@ n, Length@ # > 1 &], {n, 26}], {2}] // Flatten (* _Michael De Vlieger_, Jun 26 2016 *)

%o (PARI) row(n) = {my(d = divisors(n));my(nd = #d); my(m = matrix(#d, #d)); for (j=1, nd, m[1,j] = d[j];); for (i=2, nd, for (j=1, nd - i +1, m[i,j] = m[i-1,j+1] - m[i-1,j];);); vector(nd, i, sum(j=1, nd, m[i, j]));}

%o tabf(nn) = for (n=1, nn, print(row(n)););

%o lista(nn) = for (n=1, nn, v = row(n); for (j=1, #v, print1(v[j], ", "));); \\ _Michel Marcus_, Jun 25 2016

%Y Row lengths give A000005. Column 1 is A000203.

%Y Right border gives A187202. Row sums give A273103.

%Y Cf. A000225, A006218, A187204, A273102, A273262, A273263, A274531.

%K sign,tabf

%O 1,2

%A _Omar E. Pol_, May 20 2016