OFFSET
1,1
COMMENTS
For primes p, the period k of the decimal expansion of 1/p divides p-1. This is usually not the case for reciprocals of composites d; instead, the period k always divides phi(d) where phi is Euler's totient function (A000010). This sequence lists the composites d for which k also divides d-1, which satisfies the condition of a pseudoprime, making such composites a sequence of pseudoprimes with respect to the divisibility of d-1 by k.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..662 from Barry Smyth)
EXAMPLE
33 is a term since 1/33 = 0.030303..., its repetend is 03 so its period is 2, and 2 divides 33-1.
91 is a term since 1/91 = 0.010989010989..., its repetend is 010898 so its period is 6, and 6 divides 91-1.
925000 is a term since 1/925000 = 0.00000108108... has a repetend of 108 and a period of 3, and 3 divides 925000-1.
PROG
(Python)
from itertools import count, islice
from sympy import n_order, multiplicity, isprime
def A351396_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda d: not (isprime(d) or (p := n_order(10, d//2**multiplicity(2, d)//5**multiplicity(5, d))) <= 1 or (d-1) % p), count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Barry Smyth, Mar 24 2022
STATUS
approved