OFFSET
1,1
EXAMPLE
a(1) = 2 since A000668(1) = 3, and 2*3-1 = 5 and 2*3+1 = 7 are twin primes.
MATHEMATICA
f[p_] := Module[{k = 1}, While[!PrimeQ[k*p - 1] || !PrimeQ[k*p + 1], k++]; k]; f /@ (2^MersennePrimeExponent[Range[10]]-1) (* Amiram Eldar, Jul 18 2021 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Pierre CAMI, Oct 07 2004
EXTENSIONS
a(16)-a(20) from Amiram Eldar, Jul 18 2021
STATUS
approved