%I #4 Mar 30 2012 17:36:52
%S 1,1,1,2,1,2,3,4,9,1,1,1,2,1,2,1,1,2,1,1,3,2,1,6,1,4,3,1,1,3,5,8,1,1,
%T 5,4,3,2,1,2,5,1,7,4,5,2,1,12,1,1,5,1,2,5,5,9,1,7,13,3,2,5,4,9,13,2,
%U 19,11,1,7,1,3,11,2,3,1,7,11,19,4,2,1,5,2,1,13,7,8,1,9,11,1,14,1,19,24,33,49
%N For the smallest q for which there exists a fraction p/q containing n in its decimal expansion, this sequence gives the smallest p.
%C Inspired by problem 14 on the 2003 American Invitational Mathematics Examination, which asked for a(251). There are some slightly different versions of this sequence. For example, you could consider 1/2 = .5 or 1/2 = .50000...; I chose the latter interpretation here.
%H American Mathematics Competitions, <a href="http://www.unl.edu/amc/">Problem 14</a>
%e a(6) = 2 because 2/3 = .6...; a(24) = 6 because 6/25 = .24
%Y A081665 gives the denominators.
%K base,frac,nonn
%O 1,4
%A _Joshua Zucker_, Mar 26 2003