OFFSET
1,1
LINKS
Paul Tek, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 6 -> 1/6 = 0.{1}666666...
a(2) = 4 -> 1/4 = 0.{2}500000...
a(3) = 3 -> 1/3 = 0.{3}333333...
a(4) = 21 -> 1/4 = 0.0{4}76190...
a(5) = 2 -> 1/2 = 0.{5}000000...
a(7) = 13 as 1/13 = 0.0767... and on deleting the decimal point one gets 0714... = 714... which begins with 7.
a(8) = 12 though 1/125 = 0.8. 1/12 = 0.083...
MATHEMATICA
Do[k = 1; l = {}; d = IntegerDigits[n]; While[FromDigits[l] != n, k++; f = First[RealDigits[N[1/k, 10]]]; If[Length[f] > Length[d], l = Take[f, Length[d]], l = f]]; Print[k], {n, 1, 100}] (* Ryan Propper, Aug 10 2005 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, May 31 2004
EXTENSIONS
Corrected and extended by Ryan Propper, Aug 10 2005
Edited by N. J. A. Sloane, May 07 2007
STATUS
approved