OFFSET
0,4
COMMENTS
If a(n) = 1, then the two primes are the same and they are Fermat primes. - Michel Marcus, Mar 01 2014
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..500
EXAMPLE
5 is in this sequence because 5 + 2^3 = 13 and 5*2^3 + 1 = 41 are both prime.
MATHEMATICA
Table[Module[{k=1, c=2^n}, While[!AllTrue[{c+k, k c+1}, PrimeQ], k++]; k], {n, 0, 60}] (* Harvey P. Dale, Oct 20 2023 *)
PROG
(PARI) a(n) = {k = 1; while (!(isprime(k + 2^n) && isprime(k*2^n + 1)), k++); k; } \\ Michel Marcus, Mar 01 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Lopatin and Juri-Stepan Gerasimov, Feb 28 2014
EXTENSIONS
a(15) corrected and a(24) from Michel Marcus, Mar 01 2014
Missing term and a(25)-a(59) from Giovanni Resta, Mar 01 2014
STATUS
approved