cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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}.

Original entry on oeis.org

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
Offset: 1

Views

Author

Hugo van der Sanden, Jun 01 2010

Keywords

Examples

			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
		

Crossrefs

Programs

  • 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

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

Extensions

Corrected and extended by Hugo van der Sanden, Jun 04 2010 (errors reported by Zak Seidov).