OFFSET
1,1
COMMENTS
A digit d > 0 appearing in the decimal expansion of a term does not appear in the decimal expansion of its reciprocal and vice versa.
This sequence is infinite: if m is a term, then 10*m is also a term.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..3000
Rémy Sigrist, C++ program
EXAMPLE
The first terms, alongside their reciprocal (with the repeating part between parentheses), are:
n a(n) 1/a(n)
-- ---- ----------
1 2 0.5(0)
2 4 0.25(0)
3 5 0.2(0)
4 8 0.125(0)
5 9 0.(1)
6 11 0.(09)
7 12 0.08(3)
8 15 0.0(6)
9 18 0.0(5)
10 20 0.05(0)
11 22 0.0(45)
12 25 0.04(0)
13 36 0.02(7)
14 39 0.(025641)
15 40 0.025(0)
PROG
(C++) // See Links section.
(Python)
from itertools import count, islice
from sympy import multiplicity, n_order
def A376090_gen(startvalue=1): # generator of terms >= startvalue
for a in count(max(startvalue, 1)):
m2, m5 = (~a & a-1).bit_length(), multiplicity(5, a)
b = min(m2, m5)
a2 = a//10**b
m2 -= b
m5 -= b
r = max(m2, m5)
k, m = 10**r, 10**(t := n_order(10, (a2>>m2)//5**m5))-1
c = k//a2
if not len((set(d for d in str(c) if d!='0')|set(d for d in str(m*k//a2-c*m) if d!='0'))&set(d for d in str(a2) if d!='0')):
yield a
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Sep 09 2024
STATUS
approved