OFFSET
1,2
COMMENTS
If k is a term, then so is 10*k.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(12) = 14 is a term because 1/14 = 0.0714285714... contains no digit 0 except for leading 0's.
MAPLE
removeInitial0:= proc(L) local i;
for i from 1 to nops(L) do if L[i] <> 0 then return L[i..-1] fi od;
[]
end proc:
filter:= proc(n) local q;
q:= NumberTheory:-RepeatingDecimal(1/n);
not(member(0, removeInitial0(NonRepeatingPart(q))) or member(0, RepeatingPart(q)))
end proc:
select(filter, [$1..300]);
MATHEMATICA
Select[Range[500], FreeQ[First[RealDigits[1/#]], 0] &] (* Paolo Xausa, Apr 22 2024 *)
PROG
(Python)
from itertools import count, islice
from sympy import multiplicity, n_order
def A362710_gen(startvalue=1): # generator of terms >= startvalue
for a in count(max(startvalue, 1)):
m2, m5 = (~a&a-1).bit_length(), multiplicity(5, a)
k, m = 10**max(m2, m5), 10**(t:=n_order(10, a//(1<<m2)//5**m5))-1
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)):
yield a
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Apr 30 2023
STATUS
approved