login
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, 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,12
COMMENTS
a(159986/2) = a(79993) = -1.
EXAMPLE
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.
PROG
(PARI) a(n) = for(k=0, oo, if(ispseudoprime((2*n)*5^k+1), return(k)))
CROSSREFS
Cf. A123159, A291437 (Sierpiński problem base 3), A345403 (Riesel problem base 5).
Sequence in context: A071920 A306548 A320531 * A369195 A065719 A336087
KEYWORD
sign
AUTHOR
Felix Fröhlich, Jun 24 2021
STATUS
approved