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.
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
Examples
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.
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.
Programs
-
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
Comments