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.

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

This page as a plain text file.
%I A352156 #22 Apr 05 2022 09:40:11
%S A352156 4,5,16,36,40,44,45,50,108,160,216,252,288,292,308,360,364,375,396,
%T A352156 400,404,440,444,450,500,1024,1080,1375,1600,2072,2160,2368,2520,2880,
%U A352156 2920,3080,3125,3375,3600,3640,3750,3848,3960,4000,4040,4125,4224,4368,4400,4440,4500,5000
%N A352156 Numbers m such that the smallest digit in the decimal expansion of 1/m is 2, ignoring leading and trailing 0's.
%C A352156 Leading 0's are not considered, otherwise every integer >= 11 would be a term (see examples).
%C A352156 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 A352156 If k is a term, 10*k is also a term; so, terms with no trailing zeros are all primitive terms.
%F A352156 A352153(a(n)) = 2.
%e A352156 m = 16 is a term since 1/16 = 0.0625 and the smallest term after the leading 0 is 2.
%e A352156 m = 216 is a term since 1/216 = 0.004629629629... and the smallest term after the leading 0's is 2.
%e A352156 m = 4444 is not a term since 1/4444 = 0.00022502250225... and the smallest term after the leading 0's is 0.
%t A352156 f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[ Range@ 1100, Min@ f@# == 2 &]
%o A352156 (Python)
%o A352156 from itertools import count, islice
%o A352156 from sympy import multiplicity, n_order
%o A352156 def A352156_gen(startvalue=1): # generator of terms >= startvalue
%o A352156     for n in count(max(startvalue,1)):
%o A352156         m2, m5 = multiplicity(2,n), multiplicity(5,n)
%o A352156         k, m = 10**max(m2,m5), 10**(t := n_order(10,n//2**m2//5**m5))-1
%o A352156         c = k//n
%o A352156         s = str(m*k//n-c*m).zfill(t)
%o A352156         if s == '0' and min(str(c)) == '2':
%o A352156             yield n
%o A352156         elif '0' not in s and min(str(c).lstrip('0')+s) == '2':
%o A352156                 yield n
%o A352156 A352156_list = list(islice(A352156_gen(),20)) # _Chai Wah Wu_, Mar 28 2022
%Y A352156 Cf. A341383.
%Y A352156 Subsequences: A093141 \ {1}, A093143 \ {1}.
%Y A352156 Similar with smallest digit k: A352154 (k=0), A352155 (k=1), this sequence (k=2), A352157 (k=3), A352158 (k=4), A352159 (k=5), A352160 (k=6), A352153 (no known term for k=7), A352161 (k=8), no term (k=9).
%K A352156 nonn,base
%O A352156 1,1
%A A352156 _Bernard Schott_ and _Robert G. Wilson v_, Mar 19 2022