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.

Original entry on oeis.org

23, 29, 34, 37, 38, 43, 46, 47, 49, 53, 56, 57, 58, 59, 67, 68, 69, 73, 74, 76, 78, 79, 83, 86, 87, 89, 94, 97, 98, 203, 223, 227, 229, 233, 239, 249, 253, 257, 263, 267, 269, 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
Offset: 1

Views

Author

Sergio Pimentel, Mar 19 2025

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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
  • 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