login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A038772 Numbers not divisible by any of their digits. 31

%I #49 Feb 21 2022 01:04:34

%S 23,27,29,34,37,38,43,46,47,49,53,54,56,57,58,59,67,68,69,73,74,76,78,

%T 79,83,86,87,89,94,97,98,203,207,209,223,227,229,233,239,247,249,253,

%U 257,259,263,267,269,277,283,289,293,299,307,308,323,329,334,337,338

%N Numbers not divisible by any of their digits.

%C A038769(a(n)) = 0; complement of A038770.

%C This is a regular language when written in decimal, though the minimal regular expression is probably thousands of characters long. - _Charles R Greathouse IV_, Aug 19 2011

%C Exponential density 0.954... = A104139. Asymptotically 8/35 * n^0.954... + O(n^0.903...) members up to n. - _Charles R Greathouse IV_, Jul 22 2012

%H Reinhard Zumkeller, <a href="/A038772/b038772.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>

%e 34 is divisible by neither 3 nor 4.

%e 35 is excluded because 5 is a divisor of 35, but 37 is included because neither 3 nor 7 is a divisor of 37

%t nddQ[n_]:=Module[{idn=DeleteCases[IntegerDigits[n],0]},And@@Table[ !Divisible[n, idn[[i]]],{i,Length[idn]}]]; Select[Range[350],nddQ] (* _Harvey P. Dale_, Nov 01 2011 *)

%o (Haskell)

%o import Data.Char (digitToInt)

%o a038772 n = a038772_list !! (n-1)

%o a038772_list = filter p [1..] where

%o p n = all (> 0) $ map ((mod n) . digitToInt) $ filter (> '0') $ show n

%o -- _Reinhard Zumkeller_, Jun 19 2011

%o (PARI) is(n)=my(v=vecsort(eval(Vec(Str(n))), , 8)); for(i=if(v[1], 1, 2), #v, if(n%v[i]==0, return(0))); 1 \\ _Charles R Greathouse IV_, Jul 22 2011

%o (Magma) [k:k in [1..340]| forall{c:c in Set(Intseq(k)) diff {0}|k mod c ne 0}]; // _Marius A. Burtea_, Dec 22 2019

%o (Python)

%o def ok(n): return not any(n%int(d) == 0 for d in str(n) if d != '0')

%o print(list(filter(ok, range(1, 339)))) # _Michael S. Branicky_, May 20 2021

%Y Cf. A327561 (counts), A038770 (complement).

%Y Cf. also A034709, A034837, A038769.

%K base,easy,nonn,nice

%O 1,1

%A _Henry Bottomley_, May 04 2000

%E Edited by _N. J. A. Sloane_, Nov 17 2008 at the suggestion of _R. J. Mathar_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 11:14 EDT 2024. Contains 371278 sequences. (Running on oeis4.)