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 A173140 #15 Sep 06 2025 15:48:42 %S A173140 3,9,17,51,81,101,153,163,187,257,303,323,489,561,577,729,771,883,909, %T A173140 969,1111,1241,1297,1377,1467,1683,1717,1731,1801,1919,2261,2313,2329, %U A173140 2649,2771,2827,2907,2997,3137,3333,3349,3529,3553,3667,3723,3891,4039,4199,4267,4369,4401,4883 %N A173140 Numbers k such that the period of the decimal representation of 1/k is a square. %C A173140 The period p of 1/k is given by the smallest integer p for which 10^p == 1 (mod k). The periods of unit fractions are given by sequence A002329. %D A173140 J. W. L. Glaisher, On circulating decimals, Proc. Camb. Phil. Soc., 3 (1878), 185-206. %D A173140 D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-12. %H A173140 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DecimalExpansion.html">Decimal Expansion</a> %H A173140 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MultiplicativeOrder.html">Multiplicative Order</a> %e A173140 period of 1/3 = 1; %e A173140 period of 1/9 = 1; %e A173140 period of 1/17 = 16; %e A173140 period of 1/51 = 16. %p A173140 with(numtheory):n0:=60: ii:=1:tabl:=array(1..n0+1): for n from 2 to 10000 do: for p from 1 to 10000 while(irem(10^p,n)<>1 or gcd(n,10)<> 1) do: od: if irem(10^p,n) = 1 and gcd(n,10) = 1 and sqrt(p) = floor(sqrt(p)) then tabl[ii]:=n:ii:=ii+1:else fi:od: print(tabl): %K A173140 nonn,base,changed %O A173140 1,1 %A A173140 _Michel Lagneau_, Feb 10 2010 %E A173140 Title rephrased, more terms and Maple program added; corrected by _T. D. Noe_ and edited by _Michel Lagneau_, Apr 26 2010