login
A248849
Smallest k>0 such that 2^k*3^n-1 is a prime number.
1
1, 1, 1, 3, 2, 5, 1, 1, 4, 3, 20, 1, 4, 13, 2, 11, 3, 101, 12, 1, 10, 9, 1, 11, 7, 27, 1, 347, 11, 73, 4, 7, 52, 93, 1, 7, 51, 73, 46, 11, 8, 41, 4, 51, 2, 5, 30, 11, 10, 3, 280, 11, 7, 17, 14, 1, 32, 11, 5, 11, 19, 1, 20, 17, 22, 133, 6, 1
OFFSET
1,4
FORMULA
a(n)=1 for n=A003307(i).
EXAMPLE
2^1*3^1-1=5 prime so a(1)=1.
2^1*3^2-1=17 prime so a(2)=1.
2^1*3^3-1=53 prime so a(3)=1.
MATHEMATICA
Flatten[{1, Table[k=0; While[Not[PrimeQ[2^k*3^n-1]], k++]; k, {n, 2, 100}]}] (* Vaclav Kotesovec, Dec 05 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM n, 0
DIM k
LABEL loop1
SET n, n+1
SET k, 0
LABEL loop2
SET k, k+1
PRP 2^k*3^n-1
IF ISPRP THEN GOTO loop1
GOTO loop2
CROSSREFS
Cf. A003307.
Sequence in context: A111986 A368744 A291455 * A172216 A121490 A197293
KEYWORD
nonn
AUTHOR
Pierre CAMI, Dec 03 2014
STATUS
approved