OFFSET
2,1
EXAMPLE
5 is the least positive integer x such that both 2*x + 2 + x = 17 and 2*x - 2 - x = 3 are primes. Therefore a(2) = 5.
MATHEMATICA
Array[Block[{x = 1}, While[! AllTrue[# x + {-1, 1} (# + x), PrimeQ], x++]; x] &, 86, 2] (* Michael De Vlieger, Dec 27 2019 *)
PROG
(PARI) a(n) = my(x=1); while (!isprime(n*x + n + x) || !isprime(n*x - n - x), x++); x; \\ Michel Marcus, Nov 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Nov 13 2019
STATUS
approved