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.
%I A048962 #18 Feb 26 2022 10:48:13 %S A048962 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, %T A048962 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, %U A048962 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 %N A048962 Table in which n-th row lists digits in periodic part of decimal expansion of 1/n. %C A048962 The length of row n is A007732(n). - _T. D. Noe_, May 14 2008 %C A048962 The convention is that the earliest period is displayed. - _T. D. Noe_, May 14 2008 %D A048962 Conway and Guy, The Book of Numbers, p. 160 %H A048962 T. D. Noe, <a href="/A048962/b048962.txt">Rows n=1..100, flattened</a> %H A048962 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a> %e A048962 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. %e A048962 Triangle begins: %e A048962 0; %e A048962 0; %e A048962 3; %e A048962 0; %e A048962 0; %e A048962 6; %e A048962 1,4,2,8,5,7; %e A048962 0; %e A048962 1; %e A048962 0; %e A048962 0,9; %e A048962 3; %e A048962 0,7,6,9,2,3; %e A048962 7,1,4,2,8,5; %e A048962 6; %e A048962 0; %e A048962 ... %t A048962 nmax = 50; %t A048962 row[n_] := Switch[FactorInteger[n], {{2, _}} | {{5, _}} | {{2, _}, {5, _}}, {0}, _, rd = RealDigits[N[1 + 1/n, 10 nmax]]; FindTransientRepeat[rd[[1]] // Rest, 2][[2]]]; %t A048962 row /@ Range[nmax] // Flatten (* _Jean-François Alcover_, Dec 04 2019 *) %Y A048962 Cf. A048997, A048963. %K A048962 nonn,base,easy,tabf,nice %O A048962 1,3 %A A048962 _N. J. A. Sloane_