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.

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

This page as a plain text file.
%I A342844 #23 Dec 28 2021 11:41:18
%S A342844 27,34,38,46,49,54,56,57,58,68,69,74,76,78,86,87,94,98,203,207,209,
%T A342844 247,249,253,259,267,289,299,308,323,329,334,338,343,346,356,358,370,
%U A342844 374,376,377,380,386,388,394,398,403,406,407,429,430,434,437,446,447,454
%N A342844 Composite numbers not divisible by any of their nonzero digits.
%H A342844 Harvey P. Dale, <a href="/A342844/b342844.txt">Table of n, a(n) for n = 1..1000</a>
%p A342844 q:= n-> not isprime(n) and andmap(d-> irem(n, d)>0,
%p A342844         {convert(n, base, 10)[]} minus {0}):
%p A342844 select(q, [$1..500])[];  # _Alois P. Heinz_, Apr 01 2021
%t A342844 Select[Range@500,!PrimeQ@#&&Mod[#,DeleteCases[IntegerDigits@#,0]]~FreeQ~0&] (* _Giorgos Kalogeropoulos_, Apr 01 2021 *)
%t A342844 Select[Range[500],CompositeQ[#]&&NoneTrue[#/(IntegerDigits[#]/.(0-> Nothing)),IntegerQ]&] (* _Harvey P. Dale_, Dec 28 2021 *)
%o A342844 (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
%o A342844 (Python)
%o A342844 from sympy import isprime
%o A342844 def ok(n): return not isprime(n) and all(n%int(d) for d in str(n) if d!='0')
%o A342844 print(list(filter(ok, range(4, 455)))) # _Michael S. Branicky_, Apr 01 2021
%Y A342844 Cf. A038772, A316227.
%K A342844 nonn,base
%O A342844 1,1
%A A342844 _John Bibby_, Mar 24 2021