A350598 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 repetend.
33, 55, 91, 99, 148, 165, 175, 246, 259, 275, 325, 370, 385, 451, 481, 495, 496, 505, 561, 592, 656, 657, 703, 715, 825, 909, 925, 1035, 1045, 1105, 1233, 1375, 1476, 1626, 1729, 1825, 1912, 2035, 2120, 2275, 2368, 2409, 2465, 2475, 2525, 2556, 2752, 2821, 2981, 3160
Offset: 1
Examples
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.
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.
Programs
-
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) A350598_list = list(islice(A350598_gen(),50)) # Chai Wah Wu, May 19 2022
Comments