OFFSET
1,1
COMMENTS
This is a subset of sequence A351396, and adds the extra condition that d is included only if it is the smallest value of d with a given repetend; thus duplicate repetends are not permitted. This eliminates some values of A351396 which are powers of 10 of d. For example, 1480 is excluded because although its period (k=3 based on a repetend of 675) divides evenly into 1479, this repetend already exists for a smaller value of d, namely 148, and 3 also divides evenly into 147. 1480 is the smallest such value of d from A351396 that will be excluded based on this modification. Other values of A351396 that are excluded include 3700, 5920, 9250, 14800, ...
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..861
Barry Smyth, Are pseudoprimes hiding out among the composite reciprocals?, Towards Data Science, Mar 25 2022.
EXAMPLE
33 is a term since 1/33 = 0.030303..., its repetend is 03, so its period is 2, 2 divides 33-1 evenly, and there is no smaller value of d with this repetend.
148 is in the sequence because 1/148 has 675 as its repetend, so its period is 3 and 3 divides 148-1).
PROG
(Python)
from itertools import count, islice
from sympy import n_order, multiplicity, isprime
def A350598_gen(): # generator of terms
pset = set()
for d in count(1):
if not isprime(d):
m2, m5 = multiplicity(2, d), multiplicity(5, d)
r = max(m2, m5)
k, m = 10**r, 10**(t := n_order(10, d//2**m2//5**m5))-1
c = k//d
s = str(m*k//d-c*m).zfill(t)
if not (t <= 1 or (d-1) % t or s in pset):
yield d
pset.add(s)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Barry Smyth, Mar 27 2022
STATUS
approved