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.

A333402 Numbers m such that the largest digit in the decimal expansion of 1/m is 1.

This page as a plain text file.
%I A333402 #47 May 06 2022 13:13:51
%S A333402 1,9,10,90,99,100,900,909,990,999,1000,9000,9009,9090,9900,9990,9999,
%T A333402 10000,90000,90009,90090,90900,90909,99000,99900,99990,99999,100000,
%U A333402 900000,900009,900090,900900,909000,909090,990000,990099,999000,999900,999990,999999,1000000
%N A333402 Numbers m such that the largest digit in the decimal expansion of 1/m is 1.
%C A333402 If m is a term, 10*m is also a term.
%C A333402 If m is a term then m has only digits {1}, {9}, {1,0} or {9,0} in its decimal representation, but this is not sufficient to be a term (see examples).
%C A333402 Some subsequences below (not exhaustive, see crossrefs):
%C A333402 m = 10^k, k >= 0, hence m is in A011557 = {1, 10, 100, 1000, 10000, ...};
%C A333402 m = 9*10^k, k >= 0, hence m is in A052268 = {9, 90, 900, 9000, 90000, ...};
%C A333402 m = 10^k-1, k >= 1, hence m is in A002283 = {9, 99, 999, 9999, 99999, ...};
%C A333402 m = 9*(10^k+1), k >= 1, hence m is in 9*A000533 = {99, 909, 9009, 90009, ...};
%C A333402 m = 9+100*(100^k-1)/11, k >= 0, hence m is in 9*A094028 = {9, 909, 90909, 9090909, ...}.
%H A333402 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a>
%F A333402 A333236(a(n))= 1.
%e A333402 As 1/101 = 0.009900990099..., 101 is not a term.
%e A333402 As 1/909 = 0.001100110011..., 909 is a term.
%e A333402 As 1/9099 = 0.000109902187..., 9099 is not a term.
%e A333402 As 1/9999 = 0.000100010001..., 9999 is also a term.
%t A333402 Select[Range[10^4], Max @ RealDigits[1/#][[1]] == 1 &] (* _Amiram Eldar_, Mar 19 2020 *)
%o A333402 (Python)
%o A333402 from itertools import count, islice
%o A333402 def A333402_gen(startvalue=1): # generator of terms >= startvalue
%o A333402     for m in count(max(startvalue,1)):
%o A333402         k = 1
%o A333402         while k <= m:
%o A333402             k *= 10
%o A333402         rset = {0}
%o A333402         while True:
%o A333402             k, r = divmod(k, m)
%o A333402             if max(str(k)) > '1':
%o A333402                 break
%o A333402             else:
%o A333402                 if r in rset:
%o A333402                     yield m
%o A333402                     break
%o A333402             rset.add(r)
%o A333402             k = r
%o A333402             while k <= m:
%o A333402                 k *= 10
%o A333402 A333402_list = list(islice(A333402_gen(),30)) # _Chai Wah Wu_, Feb 17 2022
%Y A333402 Cf. A333236, A333237 (similar, with 9).
%Y A333402 Subsequences: A002283, A011557, A052268.
%Y A333402 Subsequences: 9*A000533, 9*A094028, 9*A135577, 9*A261544, 9*A330135.
%K A333402 nonn,base
%O A333402 1,2
%A A333402 _Bernard Schott_, Mar 19 2020
%E A333402 More terms from _Jinyuan Wang_, Mar 19 2020