login
A350220
Composite numbers d such that the period k of the repetend of 1/d is > 1 and divides d-1, and d is the first such composite with a given period.
1
33, 91, 148, 246, 451, 496, 505, 561, 657, 703, 1035, 1105, 1912, 2120, 2465, 2556, 2752, 2821, 4005, 4141, 5461, 6525, 6533, 6565, 6601, 6700, 7107, 8695, 8905, 8911, 10585, 11649, 12403, 12801, 13366, 13695, 13833, 14701, 15211, 15841, 17120, 18336, 19345, 19503, 19900
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
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)
A350220_list = list(islice(A350220_gen(), 50)) # Chai Wah Wu, May 19 2022
CROSSREFS
Cf. A007732 (digits period), A000010 (totient), A351396.
Sequence in context: A231392 A231460 A114069 * A305221 A316799 A165378
KEYWORD
nonn,base
AUTHOR
Barry Smyth, Mar 27 2022
STATUS
approved