|
|
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
|
|
|
1, 124, 175, 412, 1326, 1362, 1395, 1935, 3126, 3162, 3195, 3915, 4172, 9315, 14728, 17248, 21784, 72184, 123864, 124368, 126384, 132648, 132864, 136824, 138624, 142368, 148632, 162384, 163248, 163824, 164328, 164832, 168432, 183264, 186432
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
REFERENCES
|
Rodolfo Kurchan, Snark, December 2007
|
|
LINKS
|
|
|
EXAMPLE
|
124 is divisible by 1, 2 and 4 and it is not divisible by 3, 5, 6, 7, 8 and 9.
175 is divisible by 1, 5 and 7 and it is not divisible by 2, 3, 4, 6, 8 and 9.
The final term, 864312, is divisible by 8, 6, 4, 3, 1 and 2, but not by 5, 7 or 9.
|
|
MATHEMATICA
|
Select[Range@200000, (s=IntegerDigits@#; Length@s==Length@Union@s&&
Quiet@AllTrue[#/s, IntegerQ]&&NoneTrue[#/Complement[Range@9, s], IntegerQ])&] (* Giorgos Kalogeropoulos, Jul 06 2021 *)
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 *)
|
|
PROG
|
(Python)
def ok(n):
s = str(n); ss = set(s)
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)
(Python) # generates entire sequence
from sympy.utilities.iterables import multiset_permutations
def agen():
for digits in range(1, 10):
for mp in multiset_permutations("123456789", digits):
n, mpc = int("".join(mp)), set("123456789") - set(mp)
if all(n%int(d) == 0 for d in mp) and all(n%int(d) for d in mpc):
yield n
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,fini,full,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|