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.

Showing 1-1 of 1 results.

A329792 Smallest positive k such that k*n contains only the digits 1,2,3,4,5, or -1 if no such k exists.

Original entry on oeis.org

-1, 1, 1, 1, 1, 1, 2, 2, 3, 5, -1, 1, 1, 1, 1, 1, 2, 2, 3, 6, -1, 1, 1, 1, 1, 1, 2, 2, 4, 5, -1, 1, 1, 1, 1, 1, 4, 3, 3, 6, -1, 1, 1, 1, 1, 1, 7, 3, 3, 5, -1, 1, 1, 1, 1, 1, 2, 2, 4, 6, -1, 2, 2, 4, 8, 5, 2, 2, 8, 5, -1, 2, 2, 7, 3, 3, 2, 2, 3, 7, -1, 3, 16, 4, 3, 3, 4, 5, 4, 5, -1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 03 2019

Keywords

Comments

a(n) > 0 iff n is not a multiple of 10.

References

  • G. Galperin and Y. J. Ionin (Proposers), and M. Reid (Solver), Problem 12034, Amer. Math. Monthly, 126:10, 950-951, Dec. 2019.

Crossrefs

Programs

  • Python
    def A329792(n):
        if n % 10:
            m, s = 1, set('12345')
            while not set(str(m*n)) <= s:
                m += 1
            return m
        else:
            return -1 # Chai Wah Wu, Dec 04 2019
Showing 1-1 of 1 results.