A095156 Least k such that 1/k begins with n after deleting the decimal point and the zeros following the decimal point.
6, 4, 3, 21, 2, 15, 13, 12, 11, 10, 9, 8, 72, 7, 63, 6, 56, 53, 51, 5, 46, 44, 42, 41, 4, 38, 36, 35, 34, 33, 32, 31, 3, 29, 28, 271, 27, 26, 251, 25, 24, 233, 23, 223, 22, 213, 21, 205, 201, 2, 193, 19, 186, 182, 18, 176, 173, 17, 167, 164, 162, 16, 157, 154, 152, 15, 148
Offset: 1
Examples
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...
Links
- Paul Tek, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A034057.
Programs
-
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 *)
Extensions
Corrected and extended by Ryan Propper, Aug 10 2005
Edited by N. J. A. Sloane, May 07 2007