Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #28 Apr 17 2020 10:41:16
%S -1,1,2,3,4,5,12,14,24,45,-1,11,12,13,14,15,32,34,54,114,-1,21,22,23,
%T 24,25,52,54,112,145,-1,31,32,33,34,35,144,111,114,234,-1,41,42,43,44,
%U 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
%N Smallest positive multiple of n that contains only the digits 1,2,3,4,5, or -1 if no such multiple exists.
%C a(n) > 0 iff n is not a multiple of 10.
%D G. Galperin and Y. J. Ionin (Proposers), and M. Reid (Solver), Problem 12034, Amer. Math. Monthly, 126:10, 950-951, Dec. 2019.
%H Rémy Sigrist, <a href="/A329793/b329793.txt">Table of n, a(n) for n = 0..25000</a>
%H Rémy Sigrist, <a href="/A329793/a329793.gp.txt">PARI program for A329793</a>
%o (PARI) \\ See Links section.
%o (Python)
%o def A329793(n):
%o if n % 10:
%o m, s = n, set('12345')
%o while not set(str(m)) <= s:
%o m += n
%o return m
%o else:
%o return -1 # _Chai Wah Wu_, Dec 04 2019
%Y Cf. A084545, A329792.
%K sign,base
%O 0,3
%A _N. J. A. Sloane_, Dec 03 2019