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 A178495 #12 Feb 16 2025 08:33:12 %S A178495 1,11,41,81,111,187,231,451,567,891,1111,1197,1221,1539,1717,1881, %T A178495 2329,2877,3003,3591,3813,4551,4773,5643,6237,6327,7371,8991,9399, %U A178495 9449,10773,11111,11583,13167,13651,15561,16863,17589,23331,24453,27371,39501 %N A178495 Numbers k whose sum of digits equals the period of 1/k. %D A178495 J. W. L. Glaisher, On circulating decimals, Proc. Camb. Phil. Soc., 3 (1878), pp. 185-206. %D A178495 D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-12. %H A178495 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DecimalExpansion.html">Decimal Expansion</a>. %F A178495 {k: A084680(k) = A007953(k)}. - _R. J. Mathar_, Jun 07 2010 %e A178495 11 is in the sequence because 1 + 1 = 2 and 1/11 = 0.09 09 09... with period 2. %e A178495 41 is in the sequence because 4 + 1 = 5 and 1/41 = 0.02439 02439 ... with period 5. %p A178495 with(numtheory): nn:= 2343: T:=array(1..nn): U:=array(1..nn): X:=array(1..nn): Y:=array(1..nn):k:=1:for n from 2 to 999999 do:for p from 1 to 55 while(irem(10^p,n)<>1 or gcd(n,10)<> 1) do: od: if irem(10^p,n) = 1 and gcd(n,10) = 1 then T[k]:=n : U[k]:=p: k:=k+1:else fi:od: for n from 1 to nn do:p1:= T[n]: l:=length(p1):n0:=p1:s:=0:for m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s:=s+u:od: X[n]:=s: od: for n from 1 to nn do:if X[n]= U[n] then printf(`%d, `, T[n]):else fi:od: %Y A178495 Cf. A002329, A007953, A084680. %K A178495 nonn,base %O A178495 1,2 %A A178495 _Michel Lagneau_, May 28 2010