OFFSET
1,2
COMMENTS
Primes and powers of primes are in the sequence.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
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]))))
is(n)=has(divisors(n)) \\ Charles R Greathouse IV, May 16 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, May 16 2016
STATUS
approved