login
A178948
a(n) = smallest m>=0 such that n*(3^m)-1 is prime, or -1 if no such prime exists.
0
1, 1, 0, 0, -1, 0, -1, 0, -1, 1, -1, 0, -1, 0, -1, 1, -1, 0, -1, 0, -1, 2, -1, 0, -1, 2, -1, 1, -1, 0, -1, 0, -1, 1, -1, 1, -1, 0, -1, 2, -1, 0, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 0, -1, 1, -1, 1, -1, 0, -1, 0, -1, 1, -1, 1, -1, 0, -1, 3, -1, 0, -1, 0, -1, 1, -1, 1, -1, 0, -1, 3, -1, 0, -1, 1, -1, 1, -1, 0
OFFSET
1,22
COMMENTS
For odd n>=5, a(n)=-1 because then n*3^m is odd, therefore n*3^m-1 even and not prime. - R. J. Mathar, Jan 03 2011
EXAMPLE
a(1) = 1 because 1*(3^1) - 1 = 2 is prime.
a(5) = -1 because 5*(3^m) - 1 is even and >=4.
a(22) = 2 because 22*(3^2)-1 = 197 is prime.
CROSSREFS
Sequence in context: A258260 A094713 A123517 * A203827 A194289 A237194
KEYWORD
sign
AUTHOR
Jonathan Vos Post, Dec 31 2010
STATUS
approved