A112927 a(n) is the least prime such that the multiplicative order of 2 mod a(n) equals n, or a(n)=1 if no such prime exists.
1, 3, 7, 5, 31, 1, 127, 17, 73, 11, 23, 13, 8191, 43, 151, 257, 131071, 19, 524287, 41, 337, 683, 47, 241, 601, 2731, 262657, 29, 233, 331, 2147483647, 65537, 599479, 43691, 71, 37, 223, 174763, 79, 61681, 13367, 5419, 431, 397, 631, 2796203, 2351, 97, 4432676798593, 251, 103, 53, 6361, 87211
Offset: 1
Keywords
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..1206
- Dario Alejandro Alpern, Factorization using the Elliptic Curve Method
- Will Edgington, Factored Mersenne Numbers [from Internet Archive Wayback Machine]
- Wikipedia, Zsigmondy's theorem
Crossrefs
Programs
-
PARI
A112927(n,f=factor(2^n-1)[,1])=!for(i=1,#f,znorder(Mod(2,f[i]))==n&&return(f[i])) \\ Use the optional 2nd arg to give a list of pseudoprimes to try when factoring of 2^n-1 is too slow. You may try factor(2^n-1,0)[,1]. - M. F. Hasler, Feb 21 2016
Comments