OFFSET
1,1
COMMENTS
A prime p is called a unique-period prime in base b if there is no other prime q such that the period length of the base-b expansion of its reciprocal, 1/p, is equal to the period length of the reciprocal of q, 1/q.
A prime p is a unique-period prime in base b if and only if Zs(b, 1, ord(b,p)) = p^k, k >= 1. Here Zs(b, 1, d) is the greatest divisor of b^d - 1 that is coprime to b^m - 1 for all positive integers m < d, and ord(b,p) is the multiplicative order of b modulo p.
b is a term if and only if: (a) b = 11^t + 1, t >= 1; (b) b = 2^s*11^t - 1, s >= 0, t >= 1; (c) b = 2, 3.
For every odd prime p, p is a unique-period prime in base b if b = p^t + 1, t >= 1 or b = 2^s*p^t - 1, s >= 0, t >= 1. These are trivial bases in which p is a unique-period prime, with ord(b,p) = 1 or 2. By Faltings's theorem, there are only finitely many nontrivial bases in which p is also a unique-period prime, with ord(b,p) >= 3. For p = 11, the nontrivial bases are 2, 3.
LINKS
Jianing Song, Table of n, a(n) for n = 1..590
Wikipedia, Unique prime
EXAMPLE
1/11 has period length 10 in base 2. Note that 3, 11, 31 are the only prime factors of 2^10 - 1 = 1023, but 1/3 has period length 2 and 1/31 has period length 5, so 11 is a unique-period prime in base 2.
1/11 has period length 5 in base 3. Note that 2, 11 are the only prime factors of 3^5 - 1 = 242, but 1/2 has period length 1, so 11 is a unique-period prime in base 3.
PROG
(PARI)
p = 11;
gpf(n)=if(n>1, vecmax(factor(n)[, 1]), 1);
test(n, q)=while(n%p==0, n/=p); if(q>1, while(n%q==0, n/=q)); n==1;
for(n=2, 10^6, if(gcd(n, p)==1, if(test(polcyclo(znorder(Mod(n, p)), n), gpf(znorder(Mod(n, p)))), print1(n, ", "))));
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jianing Song, Jun 19 2018
STATUS
approved