OFFSET
1,1
COMMENTS
This sequence has density zero since no numbers with the digit '1' are in it. The sequence is infinite. Example: Numbers like 23, 203, 2003, 20003, etc. are included because none of them is divisible by 2, 3, or 5.
Conjecture: after a sufficiently large n this sequence grows faster than the prime numbers.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
358 is in the sequence because it can't be divided by 3, 5, 8, (3+5)=8, (3+8)=11, (5+8)=13 or (3+5+8)=16.
289 is not in the sequence because it can be divided by (8+9)=17.
MAPLE
filter:= proc(n) local L, S;
L:= convert(n, base, 10);
andmap(s -> s=0 or n mod s <> 0, map(convert, combinat:-choose(L), `+`))
end proc:
select(filter, [$1..1000]); # Robert Israel, Mar 19 2025
PROG
(PARI) isok(k) = my(d=digits(k)); forsubset(#d, s, my(ss=sum(i=1, #s, d[s[i]])); if (ss && !(k % sum(i=1, #s, d[s[i]])), return(0))); return(1); \\ Michel Marcus, Mar 27 2025
(Python)
from itertools import chain, combinations
def powerset(s): # skipping empty set
return chain.from_iterable(combinations(s, r) for r in range(1, len(s)+1))
def ok(n): return all(n%t!=0 for s in powerset(list(map(int, str(n)))) if (t:=sum(s))>0)
print([k for k in range(1, 404) if ok(k)]) # Michael S. Branicky, Apr 01 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Sergio Pimentel, Mar 19 2025
STATUS
approved
