|
|
|
|
3, 2, 3, 2, 3, 4, 5, 3, 11, 2, 3, 2, 3, 2, 5, 3, 3, 16, 3, 2, 15, 2, 5, 2, 3, 8, 5, 3, 11, 2, 3, 2, 3, 2, 5, 8, 3, 6, 3, 2, 13, 2, 13, 2, 3, 10, 11, 5, 11, 4, 3, 4, 3, 9, 13, 4, 3, 7, 3, 4, 13, 4, 5, 7, 3, 4, 5, 3, 11, 4, 5, 4, 7, 3, 5, 3, 7, 6, 5, 3, 17, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Inspired by Problem 300 in Mathematical Excalibur, Vol. 13, No. 1, February-April, 2008.
|
|
LINKS
|
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
|
|
|
STATUS
|
approved
|
|
|
|