cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382237 Numbers that are not divisible by the sum of any subset of their digits.

This page as a plain text file.
%I A382237 #27 Apr 02 2025 10:25:49
%S A382237 23,29,34,37,38,43,46,47,49,53,56,57,58,59,67,68,69,73,74,76,78,79,83,
%T A382237 86,87,89,94,97,98,203,223,227,229,233,239,249,253,257,263,267,269,
%U A382237 277,283,293,299,307,323,329,334,337,338,346,347,349,353,356,358,359,367,373,376,377,379,380,383,386,388,389,394,397,398,403
%N A382237 Numbers that are not divisible by the sum of any subset of their digits.
%C A382237 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.
%C A382237 Conjecture: after a sufficiently large n this sequence grows faster than the prime numbers.
%H A382237 Michael S. Branicky, <a href="/A382237/b382237.txt">Table of n, a(n) for n = 1..10000</a>
%e A382237 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.
%e A382237 289 is not in the sequence because it can be divided by (8+9)=17.
%p A382237 filter:= proc(n) local L,S;
%p A382237   L:= convert(n,base,10);
%p A382237   andmap(s -> s=0 or n mod s <> 0, map(convert,combinat:-choose(L),`+`))
%p A382237 end proc:
%p A382237 select(filter, [$1..1000]); # _Robert Israel_, Mar 19 2025
%o A382237 (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
%o A382237 (Python)
%o A382237 from itertools import chain, combinations
%o A382237 def powerset(s): # skipping empty set
%o A382237     return chain.from_iterable(combinations(s, r) for r in range(1, len(s)+1))
%o A382237 def ok(n): return all(n%t!=0 for s in powerset(list(map(int, str(n)))) if (t:=sum(s))>0)
%o A382237 print([k for k in range(1, 404) if ok(k)]) # _Michael S. Branicky_, Apr 01 2025
%Y A382237 Cf. A082943, A038772, A005349, A065877, A228017, A382239.
%K A382237 nonn,base
%O A382237 1,1
%A A382237 _Sergio Pimentel_, Mar 19 2025