OFFSET
1,1
EXAMPLE
2*2*3^1 - 1 = 11; 11 and 13 are twin primes so a(1)=2.
2*11*3^2 - 1 = 197; 197 and 199 are twin primes so a(2)=11 as no other prime p < 11 gives twin primes.
MATHEMATICA
Array[Block[{p = 2}, While[! AllTrue[2 p 3^# + {-1, 1}, PrimeQ], p = NextPrime@ p]; p] &, 51] (* Michael De Vlieger, Dec 24 2019 *)
PROG
(PARI) a(n) = {my(p=2); while (!isprime(2*p*3^n - 1) || !isprime(2*p*3^n + 1), p = nextprime(p+1)); p; } \\ Michel Marcus, Nov 25 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 24 2019
STATUS
approved