login
A362579
Numbers k such that the decimal expansion of 1/k does not contain the digit 5.
3
1, 3, 5, 6, 9, 10, 11, 12, 13, 15, 21, 24, 25, 27, 30, 33, 36, 37, 41, 44, 45, 48, 50, 52, 55, 60, 72, 73, 75, 77, 84, 88, 90, 91, 96, 99, 100, 101, 110, 111, 120, 123, 125, 130, 135, 137, 143, 144, 150, 159, 165, 205, 208, 210, 216, 225, 231, 237, 239, 240, 250, 259, 264, 270, 271, 273, 275, 288
OFFSET
1,2
COMMENTS
If k is a term, then so is 10*k.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2692 (n = 1..1000 from Robert Israel)
EXAMPLE
a(8) = 12 is a term because 1/12 = 0.08333... does not contain the digit 5.
MAPLE
filter:= proc(n) local q;
q:= NumberTheory:-RepeatingDecimal(1/n);
not(member(5, RepeatingPart(q)) or member(5, NonRepeatingPart(q)))
end proc:
select(filter, [$1..300]);
MATHEMATICA
Select[Range[500], FreeQ[First[RealDigits[1/#]], 5] &] (* Paolo Xausa, Apr 23 2024 *)
PROG
(Python)
from itertools import count, islice
from sympy import multiplicity, n_order
def A362579_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**n_order(10, a//(1<<m2)//5**m5)-1
if not('5' in str(c:=k//a) or '5' in str(m*k//a-c*m)):
yield a
A362579_list = list(islice(A362579_gen(), 20)) # Chai Wah Wu, May 01 2023
CROSSREFS
Complement of A353441.
Sequence in context: A321885 A161182 A267312 * A331386 A331916 A371127
KEYWORD
nonn,base
AUTHOR
Robert Israel, Apr 25 2023
STATUS
approved