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.

A048962 Table in which n-th row lists digits in periodic part of decimal expansion of 1/n.

Original entry on oeis.org

0, 0, 3, 0, 0, 6, 1, 4, 2, 8, 5, 7, 0, 1, 0, 0, 9, 3, 0, 7, 6, 9, 2, 3, 7, 1, 4, 2, 8, 5, 6, 0, 0, 5, 8, 8, 2, 3, 5, 2, 9, 4, 1, 1, 7, 6, 4, 7, 5, 0, 5, 2, 6, 3, 1, 5, 7, 8, 9, 4, 7, 3, 6, 8, 4, 2, 1, 0, 0, 4, 7, 6, 1, 9, 4, 5, 0, 4, 3, 4, 7, 8, 2, 6, 0, 8, 6, 9, 5, 6, 5, 2, 1, 7, 3, 9, 1, 3
Offset: 1

Views

Author

Keywords

Comments

The length of row n is A007732(n). - T. D. Noe, May 14 2008
The convention is that the earliest period is displayed. - T. D. Noe, May 14 2008

Examples

			1/1=1. -> 0; 1/2=.5 ->0; 1/3=.3333... -> 3; 1/4=.25 -> 0; 1/5=.2 ->0; 1/6=.1666... -> 6; 1/7=.142857... -> 1 4 2 8 5 7; etc.
Triangle begins:
  0;
  0;
  3;
  0;
  0;
  6;
  1,4,2,8,5,7;
  0;
  1;
  0;
  0,9;
  3;
  0,7,6,9,2,3;
  7,1,4,2,8,5;
  6;
  0;
  ...
		

References

  • Conway and Guy, The Book of Numbers, p. 160

Crossrefs

Programs

  • Mathematica
    nmax = 50;
    row[n_] := Switch[FactorInteger[n], {{2, }} | {{5, }} | {{2, }, {5, }}, {0}, _, rd = RealDigits[N[1 + 1/n, 10 nmax]]; FindTransientRepeat[rd[[1]] // Rest, 2][[2]]];
    row /@ Range[nmax] // Flatten (* Jean-François Alcover, Dec 04 2019 *)