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 A353441 #32 Jul 01 2023 16:54:19 %S A353441 2,4,7,8,14,16,17,18,19,20,22,23,26,28,29,31,32,34,35,38,39,40,42,43, %T A353441 46,47,49,51,53,54,56,57,58,59,61,62,63,64,65,66,67,68,69,70,71,74,76, %U A353441 78,79,80,81,82,83,85,86,87,89,92,93,94,95,97,98,102,103,104,105,106,107,108,109 %N A353441 Integers m such that the decimal expansion of 1/m contains the digit 5. %C A353441 If m is a term, 10*m is also a term, so terms with no trailing zeros are all primitive terms. %H A353441 Robert Israel, <a href="/A353441/b353441.txt">Table of n, a(n) for n = 1..10000</a> %H A353441 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a>. %e A353441 m = 7 is a term since 1/7 = 0.142857142857... %e A353441 m = 22 is a term since 1/22 = 0.04545454545... (here, 5 is the largest digit). %e A353441 m = 132 is a term since 1/693 = 0.00757575... (here, 5 is the smallest digit). %p A353441 filter:= proc(n) local q; %p A353441 q:= NumberTheory:-RepeatingDecimal(1/n); %p A353441 member(5,RepeatingPart(q)) or member(5, NonRepeatingPart(q)) %p A353441 end proc: %p A353441 select(filter, [$1..200]); # _Robert Israel_, Apr 25 2023 %t A353441 f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[ Range@ 125, MemberQ[f@#, 5] &] %o A353441 (Python) %o A353441 from itertools import count, islice %o A353441 from sympy import multiplicity, n_order %o A353441 def A353441_gen(startvalue=1): # generator of terms >= startvalue %o A353441 for a in count(max(startvalue,1)): %o A353441 m2, m5 = (~a&a-1).bit_length(), multiplicity(5,a) %o A353441 k, m = 10**max(m2,m5), 10**n_order(10,a//(1<<m2)//5**m5)-1 %o A353441 if '5' in str(c:=k//a) or '5' in str(m*k//a-c*m): %o A353441 yield a %o A353441 A353441_list = list(islice(A353441_gen(),20)) # _Chai Wah Wu_, May 01 2023 %Y A353441 A351471 (largest digit=5) and A352159 (smallest digit=5) are subsequences. %Y A353441 Similar with digit k: A352154 (k=0), A353437 (k=1), A353438 (k=2), A353439 (k=3), A353440 (k=4), this sequence (k=5), A353442 (k=6), A353443 (k=7), A353444 (k=8), A333237 (k=9). %Y A353441 Complement of A362579. %K A353441 nonn,base %O A353441 1,1 %A A353441 _Bernard Schott_ and _Robert G. Wilson v_, Apr 25 2022