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.

A352158 Numbers m such that the smallest digit in the decimal expansion of 1/m is 4, ignoring leading and trailing 0's.

This page as a plain text file.
%I A352158 #21 Apr 05 2022 09:40:15
%S A352158 22,25,144,220,225,250,1056,1184,1440,2184,2200,2250,2500,10560,11840,
%T A352158 14400,15625,20625,21024,21840,22000,22500,25000,104192,105600,115625,
%U A352158 118400,144000,156250,168192,179712,206250,210240,213312,218400,220000
%N A352158 Numbers m such that the smallest digit in the decimal expansion of 1/m is 4, ignoring leading and trailing 0's.
%C A352158 Leading 0's are not considered, otherwise every integer >= 11 would be a term (see examples).
%C A352158 Trailing 0's are also not considered, otherwise numbers of the form 2^i*5^j with i, j >= 0, apart from 1 (A003592) would be terms.
%C A352158 If k is a term, 10*k is also a term; so, terms with no trailing zeros are all primitive terms: 22, 25, 144, 225, 1056, 1184, ...
%F A352158 A352153(a(n)) = 4.
%e A352158 m = 22 is a term since 1/22 = 0.045454545... and the smallest digit after the leading 0 is 4.
%e A352158 m = 1184 is a term since 1/1184 = 0.00084459459... and the smallest digit after the leading 0's is 4.
%t A352158 f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[ Range@ 1100, Min@ f@# == 4 &]
%o A352158 (Python)
%o A352158 from itertools import count, islice
%o A352158 from sympy import multiplicity, n_order
%o A352158 def A352158_gen(startvalue=1): # generator of terms >= startvalue
%o A352158     for n in count(max(startvalue,1)):
%o A352158         m2, m5 = multiplicity(2,n), multiplicity(5,n)
%o A352158         k, m = 10**max(m2,m5), 10**(t := n_order(10,n//2**m2//5**m5))-1
%o A352158         c = k//n
%o A352158         s = str(m*k//n-c*m).zfill(t)
%o A352158         if s == '0' and min(str(c)) == '4':
%o A352158             yield n
%o A352158         elif '0' not in s and min(str(c).lstrip('0')+s) == '4':
%o A352158                 yield n
%o A352158 A352158_list = list(islice(A352158_gen(),20)) # _Chai Wah Wu_, Mar 28 2022
%Y A352158 Cf. A351470.
%Y A352158 Similar with smallest digit k: A352154 (k=0), A352155 (k=1), A352156 (k=2), A352157 (k=3), this sequence (k=4), A352159 (k=5), A352160 (k=6), A352153 (no known term for k=7), A352161 (k=8), no term (k=9).
%K A352158 nonn,base
%O A352158 1,1
%A A352158 _Bernard Schott_ and _Robert G. Wilson v_, Mar 24 2022