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.

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