login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1

%I #40 May 21 2022 08:41:49

%S 33,55,91,99,148,165,175,246,259,275,325,370,385,451,481,495,496,505,

%T 561,592,656,657,703,715,825,909,925,1035,1045,1105,1233,1375,1476,

%U 1626,1729,1825,1912,2035,2120,2275,2368,2409,2465,2475,2525,2556,2752,2821,2981,3160

%N 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.

%C 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, ...

%H Chai Wah Wu, <a href="/A350598/b350598.txt">Table of n, a(n) for n = 1..861</a>

%H Barry Smyth, <a href="https://towardsdatascience.com/are-pseudoprimes-hiding-out-among-the-composite-reciprocals-c8952cfe1ab4">Are pseudoprimes hiding out among the composite reciprocals?</a>, Towards Data Science, Mar 25 2022.

%e 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.

%e 148 is in the sequence because 1/148 has 675 as its repetend, so its period is 3 and 3 divides 148-1).

%o (Python)

%o from itertools import count, islice

%o from sympy import n_order, multiplicity, isprime

%o def A350598_gen(): # generator of terms

%o pset = set()

%o for d in count(1):

%o if not isprime(d):

%o m2, m5 = multiplicity(2,d), multiplicity(5,d)

%o r = max(m2,m5)

%o k, m = 10**r, 10**(t := n_order(10,d//2**m2//5**m5))-1

%o c = k//d

%o s = str(m*k//d-c*m).zfill(t)

%o if not (t <= 1 or (d-1) % t or s in pset):

%o yield d

%o pset.add(s)

%o A350598_list = list(islice(A350598_gen(),50)) # _Chai Wah Wu_, May 19 2022

%Y Cf. A007732 (digits period), A000010 (totient), A351396.

%K nonn,base

%O 1,1

%A _Barry Smyth_, Mar 27 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 15 09:07 EDT 2024. Contains 375173 sequences. (Running on oeis4.)