login
A342844
Composite numbers not divisible by any of their nonzero digits.
1
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,1
LINKS
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 *)
PROG
(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
CROSSREFS
Sequence in context: A309063 A088499 A058902 * A141550 A032584 A072492
KEYWORD
nonn,base
AUTHOR
John Bibby, Mar 24 2021
STATUS
approved