|
|
A273200
|
|
Prime power-like integers.
|
|
4
|
|
|
2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 21, 23, 25, 27, 29, 31, 32, 33, 37, 39, 41, 43, 47, 49, 53, 59, 61, 64, 65, 67, 71, 73, 79, 81, 83, 85, 89, 95, 97, 101, 103, 107, 109, 113, 115, 121, 125, 127, 128, 131, 133, 137, 139, 145, 149, 151, 155, 157, 161, 163, 167, 169
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Let DTD(n) denote the difference table of the divisors of n. The DTDs of prime powers (in the sense of A246655) have only positive entries and the rows and columns of their DTD are nondecreasing.
We define an integer n>0 and not the unity to be prime power-like if and only if DTD(n) has only positive entries and nondecreasing rows and columns (read from left to right and from top to bottom).
Integers which have a positive but not monotone DTD are listed in A273199. Integers with a positive DTD are listed in A273130.
|
|
LINKS
|
|
|
EXAMPLE
|
125 is in this sequence because it is a prime power and has the DTD:
[ 1 5 25 125]
[ 4 20 100]
[ 16 80]
[ 64]
161 is in this sequence because the DTD of 161 has only positive entries and nondecreasing rows and columns:
[ 1 7 23 161]
[ 6 16 138]
[ 10 122]
[ 112]
|
|
MATHEMATICA
|
pplikeQ[n_] := Module[{T, DTD, DTD2}, If[n == 1, 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]];
|
|
PROG
|
(Sage)
def is_prime_power_like(n):
if n == 1: return False
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(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 False
return b
[n for n in range(1, 170) if is_prime_power_like(n)]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|