A187584 Least number divisible by at least n of its digits, different and > 1.
2, 24, 248, 2364, 27384, 243768, 23469768, 1234759680
Offset: 1
Programs
-
Mathematica
divQ[m_, n_] := Length[(u = Union[Select[IntegerDigits[m], # > 1 &]])] >= n && Plus @@ (Boole@Divisible[m, u]) >= n; a[n_] := Module[{k = 1}, While[! divQ[k, n], k++]; k]; Array[a, 8] (* Amiram Eldar, Aug 30 2020 *)
-
Python
def c(n): return len(set(d for d in str(n) if d>'1' and n%int(d)==0)) def a(n): m = 2*10**(n-1) while c(m) < n: m += 1 return m print([a(n) for n in range(1, 7)]) # Michael S. Branicky, Feb 24 2021
Extensions
a(8) corrected by David A. Corneth, Aug 30 2020
Comments