A273261
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.
Original entry on oeis.org
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, 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, 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
Offset: 1
Triangle begins:
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, 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, 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;
...
For n = 14 the divisors of 14 are 1, 2, 7, 14, and the difference triangle of the divisors is
1, 2, 7, 14;
1, 5, 7;
4, 2;
-2;
The row sums give [24, 13, 6, -2] which is also the 14th row of the irregular triangle.
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
-
Map[Total, Table[NestWhileList[Differences, Divisors@ n, Length@ # > 1 &], {n, 26}], {2}] // Flatten (* Michael De Vlieger, Jun 26 2016 *)
-
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]));}
tabf(nn) = for (n=1, nn, print(row(n)););
lista(nn) = for (n=1, nn, v = row(n); for (j=1, #v, print1(v[j], ", "));); \\ Michel Marcus, Jun 25 2016
A273136
Difference table of the divisors of the positive integers (with every table read by columns).
Original entry on oeis.org
1, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 2, 4, 1, 4, 5, 1, 1, 0, 2, 2, 1, 2, 3, 3, 6, 1, 6, 7, 1, 1, 1, 1, 2, 2, 2, 4, 4, 8, 1, 2, 4, 3, 6, 9, 1, 1, 2, 0, 2, 3, 2, 5, 5, 10, 1, 10, 11, 1, 1, 0, 0, 1, 1, 2, 1, 0, 1, 2, 3, 1, 1, 3, 4, 2, 4, 6, 6, 12, 1, 12, 13, 1, 1, 4, -2, 2, 5, 2, 7, 7, 14, 1, 2, 0, 8, 3, 2, 8, 5, 10, 15
Offset: 1
The tables of the first nine positive integers are
1; 1, 2; 1, 3; 1, 2, 4; 1, 5; 1, 2, 3, 6; 1, 7; 1, 2, 4, 8; 1, 3, 9;
. 1; 2; 1, 2; 4; 1, 1, 3; 6; 1, 2, 4; 2, 6;
. 1; 0, 2; 1, 2; 4;
. 2; 1;
.
For n = 18 the difference table of the divisors of 18 is
1, 2, 3, 6, 9, 18;
1, 1, 3, 3, 9;
0, 2, 0, 6;
2, -2, 6;
-4, 8;
12;
This table read by columns gives the finite subsequence [1, 1, 0, 2, -4, 12], [2, 1, 2, -2, 8], [3, 3, 0, 6], [6, 3, 6], [9, 9], [18].
Cf.
A000005,
A000217,
A027750,
A184389,
A187202,
A272210,
A273102,
A273103,
A273135,
A273137,
A273263.
-
Table[Transpose@ Map[Function[w, PadRight[w, Length@ #]], NestWhileList[Differences, #, Length@ # > 1 &]] &@ Divisors@ n, {n, 15}] /. 0 -> {} // Flatten (* Michael De Vlieger, Jun 26 2016 *)
A273201
Integers which are prime power-like but not prime powers.
Original entry on oeis.org
21, 33, 39, 65, 85, 95, 115, 133, 145, 155, 161, 185, 203, 205, 215, 217, 235, 259, 261, 265, 279, 287, 295, 301, 305, 329, 335, 341, 355, 365, 371, 395, 407, 413, 415, 427, 445, 451, 469, 473, 481, 485, 497
Offset: 1
95 is in this sequence because the DTD of 95 has positive entries and nondecreasing rows and columns:
[ 1 5 19 95]
[ 4 14 76]
[10 62]
[52]
-
pplikeQ[n_] := Module[{T, DTD, DTD2}, If[n == 1 || PrimePowerQ[n], Return[False]]; T = Divisors[n]; DTD = Table[Differences[T, k], {k, 0, Length[T]-1}]; If[AnyTrue[Flatten[DTD], NonPositive], Return[False]]; DTD2 = Transpose[PadRight[#, Length[T], Infinity]& /@ DTD]; AllTrue[DTD, OrderedQ] && AllTrue[DTD2, OrderedQ]];
Select[Range[500], pplikeQ] (* Jean-François Alcover, Jun 28 2019 *)
-
# uses[is_prime_power_like from A273200]
# Compare script in A273200.
def is_A273201(n):
return not is_prime_power(n) and is_prime_power_like(n)
print(list(filter(is_A273201, range(1, 500))))
A273199
Integers which have a positive but not monotone difference table of their divisors.
Original entry on oeis.org
51, 55, 57, 69, 87, 93, 111, 119, 123, 129, 141, 159, 177, 183, 201, 207, 213, 219, 237, 249, 253, 267, 275, 291, 303, 309, 319, 321, 327, 333, 339, 369, 377, 381, 393, 403, 411, 417, 447, 453, 471, 489, 501, 519, 537, 543, 573, 579, 591, 597
Offset: 1
159 is in this sequence because the DTD of 159 has only positive entries but not all columns are nondecreasing:
[ 1 3 53 159]
[ 2 50 106]
[ 48 56]
[ 8]
-
def is_A273199(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]
if T[m-k, k] <= 0: return False
non_decreasing = lambda L: all(x<=y for x, y in zip(L, L[1:]))
b = True
for k in range(0,len(D)-1):
b &= non_decreasing(T.row(k)[:len(D)-k])
b &= non_decreasing(T.column(k)[:len(D)-k])
if not b: return True
return False
print([n for n in range(1,600) if is_A273199(n)])
A273131
Numbers n such that the bottom entry of the difference table of the divisors of n divides n.
Original entry on oeis.org
1, 2, 4, 6, 8, 12, 14, 16, 24, 32, 64, 128, 152, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648
Offset: 1
For n = 14 the difference triangle of the divisors of 14 is
1 . 2 . 7 . 14
. 1 . 5 . 7
. . 4 . 2
. . .-2
The bottom entry is -2 and -2 divides 14, so 14 is in the sequence.
-
Select[Range[10^6], Function[k, If[k == {0}, False, Divisible[#, First@ k]]]@ NestWhile[Differences, Divisors@ #, Length@ # > 1 &] &] (* Michael De Vlieger, May 17 2016 *)
-
isok(n) = {my(d = divisors(n)); my(nd = #d); my(vd = d); for (k=1, nd-1, vd = vector(#vd-1, j, vd[j+1] - vd[j]);); vd[1] && ((n % vd[1]) == 0);} \\ Michel Marcus, May 16 2016
-
is(n) = my(d=divisors(n),s=sum(i=1,#d,binomial(#d-1,i-1)*(-1)^i*d[i]));if(s!=0,n%s==0) \\ David A. Corneth, May 19 2016
-
def is_A273131(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 T[len(D)-1, 0].divides(n)
print([n for n in range(1, 6000) if is_A273131(n)])
# Peter Luschny, May 18 2016
A273133
a(n) = n minus the bottom entry of the difference table of the divisors of n.
Original entry on oeis.org
0, 1, 1, 3, 1, 4, 1, 7, 5, 10, 1, 11, 1, 16, 7, 15, 1, 6, 1, 31, 13, 28, 1, 36, 9, 34, 19, 31, 1, -20, 1, 31, 25, 46, 7, 47, 1, 52, 31, 106, 1, -62, 1, 31, 21, 64, 1, 151, 13, 66, 43, 31, 1, -34, 19, 8, 49, 82, 1, 727, 1, 88, 71, 63, 25, -6, 1, 31, 61, 148, 1, 12, 1, 106, 11, 31, 13, 22, 1, 439, 65, 118, 1, 1541
Offset: 1
For n = 18 the divisors of 18 are 1, 2, 3, 6, 9, 18, and the difference triangle of the divisors is:
1 . 2 . 3 . 6 . 9 . 18
. 1 . 1 . 3 . 3 . 9
. . 0 . 2 . 0 . 6
. . . 2 .-2 . 6
. . . .-4 . 8
. . . . . 12
The bottom entry is 12, so a(18) = 18 - 12 = 6.
-
Array[# - First@ NestWhile[Differences, Divisors@ #, Length@ # > 1 &] &, 84] (* Michael De Vlieger, May 20 2016 *)
-
a(n) = my(d=divisors(n));n-sum(i=1,#d,binomial(#d-1,i-1)*(-1)^(#d-i)*d[i]) \\ David A. Corneth, May 20 2016
-
def A273133(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 n - T[len(D)-1, 0]
print([A273133(n) for n in range(1, 85)]) # Peter Luschny, May 18 2016
A273157
Numbers which have nonpositive entries in the difference table of their divisors (complement of A273130).
Original entry on oeis.org
6, 10, 12, 14, 15, 18, 20, 22, 24, 26, 28, 30, 34, 35, 36, 38, 40, 42, 44, 45, 46, 48, 50, 52, 54, 56, 58, 60, 62, 63, 66, 68, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 86, 88, 90, 91, 92, 94, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 116, 117
Offset: 1
30 is in this sequence because the difference table of the divisors of 30 is:
[1, 2, 3, 5, 6, 10, 15, 30]
[1, 1, 2, 1, 4, 5, 15]
[0, 1, -1, 3, 1, 10]
[1, -2, 4, -2, 9]
[-3, 6, -6, 11]
[9, -12, 17]
[-21, 29]
[50]
-
def nsf(z):
D = divisors(z)
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]
if T[m-k, k] <= 0: return True
return False
print([n for n in range(1, 100) if nsf(n)])
Comments