A345698 Sierpiński 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.
0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 3, 8, 0, 1, 0, 0, 3, 0, 1, 1, 0, 1, 1, 0, 0, 1, 2, 0, 3, 0, 0, 257, 2, 0, 1, 0, 1, 1, 0, 2, 1, 2, 0, 1, 0, 0, 1, 0, 0, 3, 0, 1, 15, 4, 1, 79, 48, 0, 1, 0, 1, 5, 0, 0, 1, 6, 4, 3, 0, 0, 1, 2, 0, 3, 2, 0, 1, 0, 2, 7
Offset: 1
Keywords
Examples
For n = 17: 34*5^k + 1 is composite for k = 0, 1, 2, 3, 4, 5, 6, 7 and prime for k = 8. Since 8 is the smallest such k, a(17) = 8.
Links
- Joe O, Project Description, Mersenne forum.
- Reggie, Welcome to the Sierpinski/Riesel Base 5 Project, PrimeGrid forum.
- Wikipedia, Sierpiński number
Programs
-
PARI
a(n) = for(k=0, oo, if(ispseudoprime((2*n)*5^k+1), return(k)))
Comments