login
A343914
Riesel problem in base 3: a(n) is the smallest k >= 0 such that (2*n)*3^k-1 is prime, or -1 if no such k exists.
1
1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 2, 1, 0, 0, 1, 1, 0, 2, 0, 0, 1, 0, 1, 2, 0, 1, 1, 0, 0, 1, 1, 0, 3, 0, 0, 1, 1, 0, 3, 0, 1, 1, 0, 2, 1, 2, 0, 3, 0, 0, 1, 0, 0, 3, 0, 1, 1, 1, 2, 3, 9, 0, 1, 0, 1, 2, 0, 0, 2, 1, 6, 1, 0, 0, 1, 1, 0, 1, 3, 0, 2, 0, 1, 3, 0
OFFSET
1,11
COMMENTS
31532322469 (A273987(3)/2) is the smallest n such that a(n) = -1.
EXAMPLE
For n = 11: (2*11)*3^k-1 is prime for k = 2, with 2 being the smallest such k, so a(11) = 2.
PROG
(PARI) a(n) = for(k=0, oo, if(ispseudoprime((2*n)*3^k-1), return(k)))
CROSSREFS
Cf. A040081 (base 2), A273987.
Sequence in context: A135298 A006996 A321430 * A262774 A112604 A203399
KEYWORD
sign
AUTHOR
Felix Fröhlich, May 04 2021
STATUS
approved