OFFSET
0,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 0..200
EXAMPLE
3*2*2^0-1=5, 3*2*2^0+1=7: 5 and 7 are twin primes so for n=0 p=2.
3*2*2^1-1=11, 3*2*2^1+1=13: 11 and 13 are twin primes so for n=1 p=2.
MATHEMATICA
lpp[n_]:=Module[{p=2}, While[!AllTrue[3p 2^n+{1, -1}, PrimeQ], p=NextPrime[p]]; p]; Array[lpp, 60, 0] (* Harvey P. Dale, May 13 2022 *)
PROG
(PARI) a(n) = my(p=2); while (!(isprime(q=3*p*2^n-1) && isprime(q+2)), p=nextprime(p+1)); p; \\ Michel Marcus, Sep 23 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 24 2007
STATUS
approved