OFFSET
1,3
COMMENTS
a(n) = 1 for all numbers that contain the digit 1.
For all numbers with 6 followed by a digit in the 0-4 interval, a(n) is 1 or 2.
For all numbers with an odd digit followed by a 0, a(n) is in the 1-5 interval.
EXAMPLE
a(22) = 9 because none of 22*1 to 22*8 contain the digit that we multiplied 22 by to get the product, but 22*9 = 198 which contains the digit 9.
MATHEMATICA
a[n_] := Module[{d = 1}, While[d < 10 && ! MemberQ[IntegerDigits[n*d], d], d++]; If[d < 10, d, 0]]; Array[a, 100] (* Amiram Eldar, Aug 15 2020 *)
PROG
(PARI) a(n) = {for (d=1, 9, if (#select(x->(x==d), digits(n*d)), return (d)); ); return (0); } \\ Michel Marcus, Sep 13 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. Lowell, Aug 14 2020
STATUS
approved