cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Dec 28 2015

Keywords

Comments

The period is given in A051626 (with 0 if 1/n terminates) and A007732 (with 1 if 1/n terminates). The periodic part is given in A060284 (with initial 0's omitted) and A036275 (with initial 0's appended).

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), ...
		

Crossrefs

Formula

a(n) = A060284(n) (mod 10^A051626(n)).

Extensions

Name edited and a(13) onwards from Mohammed Yaseen, Jun 03 2021