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!)
A133606 Numbers n with all digits different, such that all of its digits divide n, but none of the nonzero digits not in n divide n. 2

%I #16 Dec 30 2021 15:31:37

%S 1,124,175,412,1326,1362,1395,1935,3126,3162,3195,3915,4172,9315,

%T 14728,17248,21784,72184,123864,124368,126384,132648,132864,136824,

%U 138624,142368,148632,162384,163248,163824,164328,164832,168432,183264,186432

%N Numbers n with all digits different, such that all of its digits divide n, but none of the nonzero digits not in n divide n.

%C Digit 1 must appear in each term. - _Michael S. Branicky_, Jul 06 2021

%D Rodolfo Kurchan, Snark, December 2007

%H Rodolfo Kurchan, Dec 27 2007, <a href="/A133606/b133606.txt">Table of n, a(n) for n = 1..116</a>

%e 124 is divisible by 1, 2 and 4 and it is not divisible by 3, 5, 6, 7, 8 and 9.

%e 175 is divisible by 1, 5 and 7 and it is not divisible by 2, 3, 4, 6, 8 and 9.

%e The final term, 864312, is divisible by 8, 6, 4, 3, 1 and 2, but not by 5, 7 or 9.

%t Select[Range@200000,(s=IntegerDigits@#;Length@s==Length@Union@s&&

%t Quiet@AllTrue[#/s,IntegerQ]&&NoneTrue[#/Complement[Range@9,s],IntegerQ])&] (* _Giorgos Kalogeropoulos_, Jul 06 2021 *)

%t Select[Range[200000],DigitCount[#,10,0]==0&&Max[DigitCount[#]]==1 && AllTrue[ #/IntegerDigits[#],IntegerQ]&&NoneTrue[#/Complement[Range[ 9],IntegerDigits[ #]], IntegerQ]&] (* _Harvey P. Dale_, Dec 30 2021 *)

%o (Python)

%o def ok(n):

%o s = str(n); ss = set(s)

%o return '0' not in ss and len(s) == len(ss) and all(n%int(d) == 0 for d in ss) and all(n%int(d) for d in set("123456789")-ss)

%o print(list(filter(ok, range(200000)))) # _Michael S. Branicky_, Jul 06 2021

%o (Python) # generates entire sequence

%o from sympy.utilities.iterables import multiset_permutations

%o def agen():

%o for digits in range(1, 10):

%o for mp in multiset_permutations("123456789", digits):

%o n, mpc = int("".join(mp)), set("123456789") - set(mp)

%o if all(n%int(d) == 0 for d in mp) and all(n%int(d) for d in mpc):

%o yield n

%o print([an for an in agen()]) # _Michael S. Branicky_, Jul 06 2021

%Y Cf. A133598.

%K nonn,fini,full,base

%O 1,2

%A _Rodolfo Kurchan_, Dec 27 2007

%E Name clarified by _Michael S. Branicky_, Jul 06 2021

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 April 19 02:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)