%I #8 Aug 17 2021 18:29:45
%S 203456789,103456798,102456789,102357896,123467890,102345798,
%T 102345698,102345976,102345678,0,203548697,30457896,20465978,20356798,
%U 23467890,20357984,20358469,20345796,20346587,0,30457896,103465978,10456789
%N Smallest multiple of n using all the digits other than used by n, or 0 if no such number exists.
%C a(n) = 0 if n==0 (mod 10), n ends in 5 and uses 0, n uses all even digits, or n uses all 9 nonzero digits.
%t sp[n_]:=Module[{digs=Complement[Range[0,9],IntegerDigits[n]]},Min[ Select[ FromDigits/@ Permutations[digs],IntegerLength[#]==(10-Length[ Union[ IntegerDigits[n]]])&&Divisible[#,n]&]]]; Array[sp,25]/.\[Infinity]->0 (* _Harvey P. Dale_, Aug 17 2021 *)
%K base,nonn
%O 1,1
%A _Amarnath Murthy_, Nov 23 2002
%E More terms from _Hans Havermann_, Jan 19 2004
|