|
|
A352796
|
|
Numbers m such that {d + m/d : d | m } does not contain consecutive integers.
|
|
1
|
|
|
1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
S[n_]:=Divisors[n]+n/Divisors[n]//Union; Test[n_]:= {aux=S[n]; Union[ {False}, Table[aux[[i+1]]-aux[[i]] ==1, {i, Length[aux]-1}]]}[[1]] //Last; Select[Range[1000], Test[#]&]
|
|
PROG
|
(PARI) isok(m) = my(list=List()); fordiv(m, d, listput(list, d+m/d)); my(w = Set(vector(#list-1, k, list[k+1]-list[k]))); #select(x->(x==1), w) == 0; \\ Michel Marcus, Jun 09 2022
(Python)
from sympy import divisors
def ok(n):
s = sorted(set(d + n//d for d in divisors(n)))
return 1 not in set(s[i+1]-s[i] for i in range(len(s)-1))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|