OFFSET
1,1
COMMENTS
a(n) is the least multiple of n that is in A031955.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(22) = 110 because 110 has two different decimal digits 0 and 1, is a multiple of 22, and no smaller multiple of 22 works.
MAPLE
f:= proc(n) local d, i, s, S;
S:= select(t -> nops(convert(convert(t*n mod 100, base, 10), set)) <= 2, [$1..99] );
for d from 3 do
S:= select(s -> nops(convert(convert(s*n mod 10^d, base, 10), set)) <= 2,
[seq(seq(s+i*10^(d-1), s = S), i=0..9)]);
for s in S do if nops(convert(convert(s*n, base, 10), set)) = 2 then return s*n fi od;
od;
end proc:
map(f, [$1..1000]);
MATHEMATICA
a[n_]:=Module[{k=n}, While[Length[DeleteDuplicates[IntegerDigits[k]]]!=2, k+=n]; k]; Array[a, 73] (* Stefano Spezia, Feb 13 2025 *)
PROG
(PARI) a(n) = my(k=n); while(#Set(digits(k)) != 2, k+=n); k; \\ Michel Marcus, Feb 13 2025
CROSSREFS
KEYWORD
AUTHOR
Robert Israel, Feb 11 2025
STATUS
approved