OFFSET
1,1
COMMENTS
Inspired by Problem 300 in Mathematical Excalibur, Vol. 13, No. 1, February-April, 2008.
LINKS
Michel Marcus, Table of n, a(n) for n = 1..1000
Kin Y. Li, Problem 300, Mathematical Excalibur, Vol. 13, No. 1, February-April, 2008.
EXAMPLE
For n=5, odd, 5*2=10, 5*3=15, so 3 is the smallest k such that all digits of 5*k are odd.
For n=8, even, 8*2=16, 8*3=24, so 3 is the smallest k such that all digits of 8*k are even.
MATHEMATICA
Table[k = 2; While[d = IntegerDigits[k*n]; If[OddQ[n], done = And @@ OddQ[d], done = And @@ EvenQ[d]]; ! done, k++]; k, {n, 100}] (* T. D. Noe, Oct 10 2012 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Oct 09 2012
STATUS
approved