|
|
A273130
|
|
Numbers which have only positive entries in the difference table of their divisors.
|
|
5
|
|
|
1, 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, 51, 53, 55, 57, 59, 61, 64, 65, 67, 69, 71, 73, 79, 81, 83, 85, 87, 89, 93, 95, 97, 101, 103, 107, 109, 111, 113, 115, 119, 121, 123, 125, 127, 128, 129, 131, 133
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Primes and powers of primes are in the sequence.
|
|
LINKS
|
|
|
EXAMPLE
|
85 is in the sequence because the difference table of the divisors of 85 has only entries greater than 0:
[1, 5, 17, 85]
[4, 12, 68]
[8, 56]
[48]
|
|
MATHEMATICA
|
Select[Range@ 1000, {} == NestWhile[ Differences, Divisors @ #, # != {} && Min[#] > 0 &] &] (* Giovanni Resta, May 16 2016 *)
|
|
PROG
|
(Sage)
def sf(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 False
return True
print([z for z in range(1, 100) if sf(z)])
(PARI) has(v)=if(#v<2, v[1]>0, if(vecmin(v)<1, 0, has(vector(#v-1, i, v[i+1]-v[i]))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|