OFFSET
1,3
COMMENTS
Conjecture: a(n) is ~ (n*log(2))^2/9 as n increases.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..1000
EXAMPLE
(6*1-3)*2^1-1 = 5, (6*1-3)*2^1+1 = 7; 5 and 7 are twin primes so a(1) = 1.
(6*1-3)*2^2-1 = 11, (6*1-3)*2^2+1 = 13; 11 and 13 are twin primes so a(2) = 1.
MATHEMATICA
Table[k = 1; While[Times @@ Boole@ PrimeQ[(6 k - 3) 2^n + {-1, 1}] < 1, k++]; k, {n, 69}] (* Michael De Vlieger, May 04 2017 *)
PROG
(PARI) a(n) = {my(k=1); while (!isprime((6*k-3)*2^n-1) || !isprime((6*k-3)*2^n+1), k++); k; } \\ Michel Marcus, May 01 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 29 2017
STATUS
approved