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.

Showing 1-2 of 2 results.

A382239 Numbers not divisible by any of their digits nor by the sum of their digits. Digit 0 is allowed (and does not divide anything).

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, 259, 263, 267, 269, 277, 283, 289, 293, 299, 307, 323, 329, 334, 337, 338, 343, 346, 347, 349, 353, 356, 358, 359, 367, 373, 374, 376
Offset: 1

Views

Author

Robert Israel, Mar 19 2025

Keywords

Comments

From a suggestion by Sergio Pimentel.

Examples

			a(5) = 38 is included because 38 is not divisible by 3, 8 or 3 + 8 = 11.
a(30) = 203 is included because 203 is not divisible by 2, 0, 3 or 2 + 0 + 3 = 5.
		

Crossrefs

Subsequence of A052383.

Programs

  • Maple
    filter:= proc(n) local L;
      L:= subs(0=NULL,convert(n,base,10));
      not ormap(t -> n mod t = 0, [op(L),convert(L,`+`)])
    end proc:
    select(filter, [$1..1000]);
  • Mathematica
    s= {};Do[t=Select[IntegerDigits[n],#>0&];AppendTo[t,Total[t]];If[NoneTrue[t,Mod[n,#]==00&],AppendTo[s,n]],{n,376}];s (* James C. McMahon, Mar 21 2025 *)
  • Python
    def ok(n):
        d = list(map(int, str(n)))
        return (s:=sum(d)) and n%s!=0 and all(n%di!=0 for di in set(d)-{0})
    print([k for k in range(1, 377) if ok(k)]) # Michael S. Branicky, Apr 01 2025

Formula

n^k << a(n) < 2^n for n > 5 where k = log(10)/log(9). - Charles R Greathouse IV, Mar 20 2025

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
Showing 1-2 of 2 results.