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.

A362710 Numbers m such that the decimal expansion of 1/m contains no digit 0, ignoring leading and trailing 0's.

This page as a plain text file.
%I A362710 #25 Apr 23 2024 03:30:56
%S A362710 1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,22,24,25,26,28,30,32,35,36,40,
%T A362710 44,45,50,54,55,56,60,64,65,66,70,72,74,75,80,82,88,90,100,104,108,
%U A362710 112,120,125,128,132,140,144,148,150,160,175,176,180,200,216,220,224,225,240,250,252,260,264
%N A362710 Numbers m such that the decimal expansion of 1/m contains no digit 0, ignoring leading and trailing 0's.
%C A362710 If k is a term, then so is 10*k.
%H A362710 Robert Israel, <a href="/A362710/b362710.txt">Table of n, a(n) for n = 1..1000</a>
%e A362710 a(12) = 14 is a term because 1/14 = 0.0714285714... contains no digit 0 except for leading 0's.
%p A362710 removeInitial0:= proc(L) local i;
%p A362710   for i from 1 to nops(L) do if L[i] <> 0 then return L[i..-1] fi od;
%p A362710   []
%p A362710 end proc:
%p A362710 filter:= proc(n) local q;
%p A362710   q:= NumberTheory:-RepeatingDecimal(1/n);
%p A362710   not(member(0, removeInitial0(NonRepeatingPart(q))) or member(0, RepeatingPart(q)))
%p A362710 end proc:
%p A362710 select(filter, [$1..300]);
%t A362710 Select[Range[500], FreeQ[First[RealDigits[1/#]], 0] &] (* _Paolo Xausa_, Apr 22 2024 *)
%o A362710 (Python)
%o A362710 from itertools import count, islice
%o A362710 from sympy import multiplicity, n_order
%o A362710 def A362710_gen(startvalue=1): # generator of terms >= startvalue
%o A362710     for a in count(max(startvalue,1)):
%o A362710         m2, m5 = (~a&a-1).bit_length(), multiplicity(5,a)
%o A362710         k, m = 10**max(m2,m5), 10**(t:=n_order(10,a//(1<<m2)//5**m5))-1
%o A362710         if not('0' in str(c:=k//a).lstrip('0') or ((w:=str(m*k//a-c*m).zfill(t)) != '0' and '0' in w)):
%o A362710             yield a
%o A362710 A362710_list = list(islice(A362710_gen(),30)) # _Chai Wah Wu_, May 04 2023
%Y A362710 Complement of A352154. Cf. A362579.
%K A362710 nonn,base
%O A362710 1,2
%A A362710 _Robert Israel_, Apr 30 2023