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.

A333237 Numbers k such that 1/k contains at least one '9' in its decimal expansion.

This page as a plain text file.
%I A333237 #34 Feb 07 2022 21:46:21
%S A333237 11,13,17,19,21,23,29,31,34,38,41,42,43,46,47,49,51,52,53,57,58,59,61,
%T A333237 62,67,68,69,71,73,76,77,81,82,83,84,85,86,87,89,91,92,94,95,97,98,
%U A333237 101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,118
%N A333237 Numbers k such that 1/k contains at least one '9' in its decimal expansion.
%C A333237 Almost every prime appears in this sequence.
%C A333237 Among the first 10000 primes, only 2, 3, 5, 7, 37, 79, 239, 4649, and 62003 do not appear in the sequence. - _Giovanni Resta_, Mar 13 2020
%C A333237 The next primes not in the sequence are 538987, 35121409, and 265371653. - _Robert Israel_, Mar 18 2020
%H A333237 Robert Israel, <a href="/A333237/b333237.txt">Table of n, a(n) for n = 1..10000</a>
%H A333237 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a>
%F A333237 A333236(a(n)) = 9.
%e A333237 5 is not in the sequence because 1/5 = 0.2 does not contain any 9s.
%p A333237 f:= proc(n) local m,S,r;
%p A333237    m:= 1; S:= {1};
%p A333237    do
%p A333237      r:= floor(m/n);
%p A333237      if r = 9 then return true fi;
%p A333237      m:= (m - r*n)*10;
%p A333237      if member(m,S) then return false fi;
%p A333237      S:= S union {m};
%p A333237    od
%p A333237 end proc:
%p A333237 select(f, [$1..1000]); # _Robert Israel_, Mar 18 2020
%t A333237 Select[Range[120], MemberQ[ Flatten@ RealDigits[1/#][[1]], 9] &] (* _Giovanni Resta_, Mar 12 2020 *)
%o A333237 (Python)
%o A333237 from itertools import count, islice
%o A333237 from sympy import n_order, multiplicity
%o A333237 def A333237_gen(startvalue=1): # generator of terms
%o A333237     for m in count(max(startvalue,1)):
%o A333237         m2, m5 = multiplicity(2,m), multiplicity(5,m)
%o A333237         if max(str(10**(max(m2,m5)+n_order(10,m//2**m2//5**m5))//m)) == '9':
%o A333237             yield m
%o A333237 A333237_list = list(islice(A333237_gen(), 10)) # _Chai Wah Wu_, Feb 07 2022
%Y A333237 Cf. A333236.
%Y A333237 Subsequences (for terms > 1): A000533, A002275, A135577, A252491.
%Y A333237 Cf. A216664 (a subsequence).
%Y A333237 Cf. A187614.
%K A333237 nonn,base,easy
%O A333237 1,1
%A A333237 _Andrew Slattery_, Mar 12 2020
%E A333237 More terms from _Giovanni Resta_, Mar 12 2020