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

A342844 Composite numbers not divisible by any of their nonzero digits.

Original entry on oeis.org

27, 34, 38, 46, 49, 54, 56, 57, 58, 68, 69, 74, 76, 78, 86, 87, 94, 98, 203, 207, 209, 247, 249, 253, 259, 267, 289, 299, 308, 323, 329, 334, 338, 343, 346, 356, 358, 370, 374, 376, 377, 380, 386, 388, 394, 398, 403, 406, 407, 429, 430, 434, 437, 446, 447, 454
Offset: 1

Views

Author

John Bibby, Mar 24 2021

Keywords

Crossrefs

Programs

  • Maple
    q:= n-> not isprime(n) and andmap(d-> irem(n, d)>0,
            {convert(n, base, 10)[]} minus {0}):
    select(q, [$1..500])[];  # Alois P. Heinz, Apr 01 2021
  • Mathematica
    Select[Range@500,!PrimeQ@#&&Mod[#,DeleteCases[IntegerDigits@#,0]]~FreeQ~0&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
    Select[Range[500],CompositeQ[#]&&NoneTrue[#/(IntegerDigits[#]/.(0-> Nothing)),IntegerQ]&] (* Harvey P. Dale, Dec 28 2021 *)
  • PARI
    isok(n)={if(isprime(n), 0, my(v=digits(n)); for(i=1, #v, if(v[i]<>0 && n%v[i]==0, return(0))); 1)} \\ Andrew Howroyd, Mar 25 2021
    
  • Python
    from sympy import isprime
    def ok(n): return not isprime(n) and all(n%int(d) for d in str(n) if d!='0')
    print(list(filter(ok, range(4, 455)))) # Michael S. Branicky, Apr 01 2021
Showing 1-1 of 1 results.