OFFSET
1,1
COMMENTS
This is a subset of sequence A351396 with the extra condition that d is included if and only if it is the smallest value of d with a given period. Thus, 246 is included because its period is 5 (repetend is 04065) and it is the first valid of d with this period and, moreover, 5 divides evenly into 245. However, 55 (which is in A351396) is excluded because although its period (2 based on a repetend of 18 for 1/55) divides evenly into 54, there is a smaller value of d (33) with this property and a period of 2 (1/33 has a repetend of 03).
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..3839
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 into 33-1 evenly, and there is no smaller value of d with this period.
91 is a term since 1/91 = 0.010989010989..., its repetend is 010989, so its period is 6, 6 divides into 91-1 evenly, and there is no smaller value of d with this period.
148 is a term since 1/148 = 0.00675675..., its repetend is 675, so its period is 3, 3 divides into 148-1 evenly, and there is no smaller value of d with this period.
Note that 370 is not in the sequence even though the repetend of 1/370 is 027 (period = 3) and 3 divides 370-1 because the period of 3 is accounted for by 148; note, 370 is in the related sequence A351396.
PROG
(Python)
from itertools import count, islice
from sympy import n_order, multiplicity, isprime
def A350220_gen(): # generator of terms
pset = set()
for d in count(1):
if not (isprime(d) or (p := n_order(10, d//2**multiplicity(2, d)//5**multiplicity(5, d))) <= 1 or (d-1) % p or p in pset):
yield d
pset.add(p)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Barry Smyth, Mar 27 2022
STATUS
approved