A266385 a(n) = floor(10^k/n) where k is the smallest integer such that the whole first period or the whole terminating fractional part of the decimal expansion of 1/n is shifted to appear before the decimal point in 10^k/n.
1, 5, 3, 25, 2, 16, 142857, 125, 1, 1, 9, 83, 76923, 714285, 6, 625, 588235294117647, 5, 52631578947368421, 5, 47619, 45, 434782608695652173913, 416, 4, 384615, 37, 3571428, 344827586206896551724137931, 3, 32258064516129, 3125, 3, 2941176470588235, 285714, 27
Offset: 1
Examples
a(1) = 1 because 1/1 = 1.0 (k = 0), a(2) = 5 because 1/2 = 0.5 (k = 1), a(3) = 3 because 1/3 = 0.{3}*, where {...}* means that these digits repeat forever. a(4) = 25 because 1/4 = 0.25 (k = 2), a(5) = 2 because 1/5 = 0.2 (k = 1), a(6) = 16 because 1/6 = 0.1{6}* (k = 2), a(7) = 142857 because 1/7 = 0.{142857}* (k = 6), a(8) = 125 because 1/8 = 0.125 (k = 3), a(9) = 1 because 1/9 = 0.{1}* (k = 1), a(10) = 1 because 1/10 = 0.1 (k = 1), ...
Extensions
Name edited and a(13) onwards from Mohammed Yaseen, Jun 03 2021
Comments