OFFSET
1,1
COMMENTS
In other words, the sequence contains those positive integers m where the difference (d_{k+1} - d_k) between some pair of consecutive positive divisors of m is greater than the difference (d_{k+2} - d_{k+1}) between the next pair of consecutive divisors of m.
LINKS
Miles Englezou, Table of n, a(n) for n = 1..10000
EXAMPLE
The positive divisors of 20 are 1,2,4,5,10,20. d_2 + d_4 = 2 + 5 is < 2 * d_3 = 2 * 4. So 20 is a term.
MATHEMATICA
f[n_] := Block[{d}, d = Divisors[n]; d - Prepend[Most[d], 0]]; Flatten[Position[OrderedQ /@ Array[f, 260], False]] (* Ray Chandler, Nov 01 2007 *)
a = {}; For[n = 1, n < 1000, n++, c = 0; For[j = 1, j < Length[Divisors[n]] - 1, j++, If[Divisors[n][[j]] + Divisors[n][[j + 2]] < 2*Divisors[n][[j + 1]], c = 1]]; If[c == 1, AppendTo[a, n]]]; a (* Stefan Steinerberger, Oct 31 2007 *)
PROG
(PARI) isok(n) = my(D = divisors(n), A = apply(x -> D[x] - D[x-1], [2..#D])); if(vecprod(apply(x -> A[x] >= A[x-1], [2..#A])) <> 1, 1, 0) \\ Miles Englezou, Jan 06 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 30 2007
EXTENSIONS
Extended by Ray Chandler and Stefan Steinerberger, Nov 01 2007
STATUS
approved
