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.

A352023 Primes p such that 1/p does not contain digit '9' in its decimal expansion.

This page as a plain text file.
%I A352023 #38 Mar 18 2022 00:09:05
%S A352023 2,3,5,7,37,79,239,4649,62003,538987,35121409,265371653
%N A352023 Primes p such that 1/p does not contain digit '9' in its decimal expansion.
%C A352023 Terms a(1)-a(9) and a(10)-a(12) were respectively found by _Giovanni Resta_ and _Robert Israel_ (comments in A333237).
%C A352023 The corresponding largest digit in the decimal expansion of 1/a(n) is A352024(n).
%C A352023 If it exists, a(13) > 2.7*10^8.
%C A352023 a(13) > 1360682471 (with A187614). - _Jinyuan Wang_, Mar 03 2022
%C A352023 a(13) <= 5363222357, a(14) <= 77843839397. - _David A. Corneth_, Mar 03 2022
%e A352023 The largest digit in the decimal expansion of 1/7 = 0.142857142857... is 8 < 9, hence 7 is a term.
%p A352023 f:= proc(n) local m, S, r;
%p A352023    m:= 1; S:= {1};
%p A352023    do
%p A352023      r:= floor(m/n);
%p A352023      if r = 9 then return true fi;
%p A352023      m:= (m - r*n)*10;
%p A352023      if member(m, S) then return false fi;
%p A352023      S:= S union {m};
%p A352023    od
%p A352023 end proc:
%p A352023 remove(f, [seq(ithprime(i),i=1..10^5)]); # _Robert Israel_, Mar 16 2022
%t A352023 Select[Range[10^5], PrimeQ[#] && FreeQ[RealDigits[1/#][[1, 1]], 9] &] (* _Amiram Eldar_, Feb 28 2022 *)
%o A352023 (PARI) isok(p) = if (isprime(p), my(m2=valuation(p, 2), m5=valuation(p, 5)); vecmax(digits(floor(10^(max(m2,m5) + znorder(Mod(10, p/2^m2/5^m5))+1)/p))) < 9); \\ _Michel Marcus_, Feb 28 2022
%o A352023 (Python)
%o A352023 from sympy import n_order, nextprime
%o A352023 from itertools import islice
%o A352023 def A352023_gen(): # generator of terms
%o A352023     yield from (2,3,5)
%o A352023     p = 7
%o A352023     while True:
%o A352023         if '9' not in str(10**(n_order(10, p))//p):
%o A352023             yield p
%o A352023         p = nextprime(p)
%o A352023 A352023_list = list(islice(A352023_gen(),9)) # _Chai Wah Wu_, Mar 03 2022
%Y A352023 Subsequence of A187614.
%Y A352023 Cf. A004023, A333237, A352024.
%K A352023 nonn,base,more
%O A352023 1,1
%A A352023 _Bernard Schott_, Feb 28 2022