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!)
A169858 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}. 3
1, 2, 6, 12, 45, 60, 245, 245, 504, 504, 5049, 5049, 10296, 11760, 11760, 11760, 56160, 56160, 198016, 198016, 1008159, 1323008, 2340849, 6240366, 13442580, 13442580, 37536408, 37536408, 75432065, 75432065, 180092645, 319800096, 319800096, 800640126, 2201169600, 2201169600, 3780487275, 5250966084, 5250966084, 6832425609, 36960308625, 36960308625, 62244072512, 62244072512, 62244072512, 62244072512, 372960042489, 372960042489 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Hugo van der Sanden A169858: C source code to calculate terms.
FORMULA
a(n) = min m: forall d in {1..n}: exists k in {0..log_10(m)}: d | floor(m / 10^k).
a(n) <= A003418(n). - Michael S. Branicky, Jun 09 2023
EXAMPLE
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
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
n = 1
for k in count(1):
s = str(k)
prefixes = [int(s[:i+1]) for i in range(len(s))]
if all(any(ki%m == 0 for ki in prefixes) for m in range(1, n+1)):
yield k; n += 1
while any(ki%n == 0 for ki in prefixes):
yield k; n += 1
print(list(islice(agen(), 20))) # Michael S. Branicky, Jun 09 2023
CROSSREFS
Sequence in context: A261467 A180070 A177834 * A292132 A208147 A369330
KEYWORD
nonn,base
AUTHOR
Hugo van der Sanden, Jun 01 2010
EXTENSIONS
Corrected and extended by Hugo van der Sanden, Jun 04 2010 (errors reported by Zak Seidov).
STATUS
approved

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 18 11:52 EDT 2024. Contains 371779 sequences. (Running on oeis4.)