login
A329793
Smallest positive multiple of n that contains only the digits 1,2,3,4,5, or -1 if no such multiple exists.
2
-1, 1, 2, 3, 4, 5, 12, 14, 24, 45, -1, 11, 12, 13, 14, 15, 32, 34, 54, 114, -1, 21, 22, 23, 24, 25, 52, 54, 112, 145, -1, 31, 32, 33, 34, 35, 144, 111, 114, 234, -1, 41, 42, 43, 44, 45, 322, 141, 144, 245, -1, 51, 52, 53, 54, 55, 112, 114, 232, 354, -1, 122, 124, 252, 512, 325, 132, 134, 544, 345, -1
OFFSET
0,3
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.
LINKS
PROG
(PARI) \\ See Links section.
(Python)
def A329793(n):
if n % 10:
m, s = n, set('12345')
while not set(str(m)) <= s:
m += n
return m
else:
return -1 # Chai Wah Wu, Dec 04 2019
CROSSREFS
Sequence in context: A250049 A132027 A306077 * A103651 A093713 A057472
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Dec 03 2019
STATUS
approved