[go: up one dir, main page]

login
A133598
Numbers k with all digits distinct and nonzero, such that none of k's digits divide k, but all the nonzero digits not in k do divide k.
2
5936, 45798, 45978, 47598, 47958, 49578, 49758, 54798, 57894, 58794, 58974, 59478, 59836, 59874, 74598, 74958, 75498, 78594, 78954, 79458, 79854, 85794, 87594, 87954, 89574, 94578, 94758, 95478, 95874, 97458, 97854, 98754, 346598, 358694
OFFSET
1,1
COMMENTS
From Michael S. Branicky, Jul 06 2021: (Start)
No term contains 1 as a digit.
If 0 were allowed as a digit, then there would be 106104 terms, starting with 0, 5936, 9780, 37960, 45798 and ending with 987654203. (End)
REFERENCES
Rodolfo Kurchan, Snark, December 2007
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..13272 (terms 1..100 from Rodolfo Kurchan)
EXAMPLE
5936 is because 5936 is not divisible by 3, 5, 6 or 9 and is divisible by 1, 2, 4, 7 and 8.
MATHEMATICA
addQ[n_]:=Module[{idn=IntegerDigits[n]}, FreeQ[idn, 0]&&Max[DigitCount[ n]] == 1&&Union[Divisible[n, idn]]=={False}&&And@@Divisible[n, Complement[ Range[ 9], idn]]]; Select[Range[400000], addQ] (* Harvey P. Dale, Oct 25 2017 *)
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) for d in ss) and all(n%int(d) == 0 for d in set("123456789")-ss)
answer2 = list(filter(ok, range(N))) # Michael S. Branicky, Jul 06 2021
(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) for d in mp) and all(n%int(d) == 0 for d in mpc):
yield n
print([an for an in agen()]) # Michael S. Branicky, Jul 06 2021
CROSSREFS
Cf. A133606.
Sequence in context: A251464 A031575 A031755 * A028517 A289515 A186479
KEYWORD
nonn,base,fini,full
AUTHOR
Rodolfo Kurchan, Dec 27 2007
EXTENSIONS
Name clarified by Tanya Khovanova, Jul 06 2021
STATUS
approved