A345403 Riesel problem in base 5: a(n) is the smallest k >= 0 such that (2*n)*5^k - 1 is prime, or -1 if no such k exists.
4, 0, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 4, 1, 0, 0, 163, 1, 0, 1, 0, 0, 1, 0, 2, 5, 0, 2, 7, 0, 0, 5, 5, 0, 1, 0, 0, 1, 1, 0, 1, 0, 2058, 1, 0, 26, 5, 1, 0, 1, 0, 0, 3, 0, 0, 3, 0, 32, 17, 1, 2, 1, 3, 0, 3, 0, 8, 21, 0, 0, 1, 1, 4, 1, 0, 0, 1, 4, 0, 7, 1, 0, 1, 0
Offset: 1
Keywords
Examples
For n = 5: 10*5^k - 1 is composite for k = 0, 1, 2 and prime for k = 3. Since 3 is the smallest such k, a(5) = 3.
Links
- Joe O, Project Description, Mersenne forum.
- Reggie, Welcome to the Sierpinski/Riesel Base 5 Project, PrimeGrid forum.
- Wikipedia, Riesel number
Programs
-
PARI
a(n) = for(k=0, oo, if(ispseudoprime((2*n)*5^k-1), return(k)))
Comments