OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..16999 (first 200 terms from Harvey P. Dale, terms extracted from rieselprime link)
A. V. Kulsha, k*2^n-1 and k*2^n+1 are twins, provides terms for n<=1000.
Andrey Kulsha and others, k*2^n-1 and k*2^n+1 are twins, digest of 15 messages in primenumbers Yahoo group, Nov 18, 2002 - May 23, 2005.
Author?, First odd k for which k*2^n-1 k*2^n+1 are twins, provides terms for n<=17000.
EXAMPLE
a(4)=15 because k*2^4-1 and k*2^4+1 are twin primes for k=15 and are not twin primes for smaller odd k.
MATHEMATICA
f[n_] := Block[{k = 1}, While[ !PrimeQ[k*2^n - 1] || !PrimeQ[k*2^n + 1], k += 2]; k]; Array[f, 50]
mok[n_]:=Module[{n2=2^n, k=1}, While[!AllTrue[k*n2+{1, -1}, PrimeQ], k=k+2]; k]; Array[mok, 60] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 19 2015 *)
PROG
(PARI) for(n=1, 100, N=2^n; forstep(k=1, 10^100, 2, if(isprime(k*N-1) && isprime(k*N+1), print1(k, ", "); break)))
(Sage) A076806 = lambda n: next(k for k in IntegerRange(1, infinity, 2) if is_prime(k*2**n-1) and is_prime(k*2**n+1)) # D. S. McNeil, Dec 08 2010
(Magma) a:=[]; for n in [1..55] do k:=1; while not (IsPrime(k*2^n-1) and IsPrime(k*2^n+1)) do k:=k+2; end while; Append(~a, k); end for; a; // Marius A. Burtea, Nov 16 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrey V. Kulsha, Nov 18 2002
STATUS
approved