%I #15 Jun 10 2023 08:15:37
%S 1,2,6,12,45,60,245,245,504,504,5049,5049,10296,11760,11760,11760,
%T 56160,56160,198016,198016,1008159,1323008,2340849,6240366,13442580,
%U 13442580,37536408,37536408,75432065,75432065,180092645,319800096,319800096,800640126,2201169600,2201169600,3780487275,5250966084,5250966084,6832425609,36960308625,36960308625,62244072512,62244072512,62244072512,62244072512,372960042489,372960042489
%N Smallest integer k such that k or one of its left substrings (or prefixes, regarded as an integer) is divisible by any integer from {1,2,...,n}.
%H Hugo van der Sanden <a href="https://github.com/hvds/seq/tree/master/A169858">A169858</a>: C source code to calculate terms.
%F a(n) = min m: forall d in {1..n}: exists k in {0..log_10(m)}: d | floor(m / 10^k).
%F a(n) <= A003418(n). - _Michael S. Branicky_, Jun 09 2023
%e a(5) = 45 as the left substrings of 45 are {4, 45} and for every d in {1,2,...,n} = {1, 2, 3, 4, 5} there is a left substring of 45 such that d | 45. That is: 1 | 4, 2 | 4, 3 | 45, 4 | 4, 5 | 45. - _David A. Corneth_, Jun 09 2023
%o (Python)
%o from itertools import count, islice
%o def agen(): # generator of terms
%o n = 1
%o for k in count(1):
%o s = str(k)
%o prefixes = [int(s[:i+1]) for i in range(len(s))]
%o if all(any(ki%m == 0 for ki in prefixes) for m in range(1, n+1)):
%o yield k; n += 1
%o while any(ki%n == 0 for ki in prefixes):
%o yield k; n += 1
%o print(list(islice(agen(), 20))) # _Michael S. Branicky_, Jun 09 2023
%Y Cf. A177834, A175516, A003418.
%K nonn,base
%O 1,2
%A _Hugo van der Sanden_, Jun 01 2010
%E Corrected and extended by _Hugo van der Sanden_, Jun 04 2010 (errors reported by _Zak Seidov_).