This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A329457 #15 Jan 16 2020 05:22:24 %S A329457 5,4,3,2,5,2,7,2,3,3,13,2,9,2,3,3,5,2,3,4,5,6,7,3,9,5,5,4,13,3,3,2,9, %T A329457 4,11,3,21,4,9,3,5,2,7,2,5,4,17,2,19,5,3,7,7,2,3,5,5,7,7,8,19,2,5,3, %U A329457 23,3,15,5,3,6,19,11,67,2,3,3,7,5,9,4,9,6,5,2,13,4 %N A329457 Least positive integer x such that both n*x + n + x and n*x - n - x are primes, or -1 if no such x exists. %e A329457 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. %t A329457 Array[Block[{x = 1}, While[! AllTrue[# x + {-1, 1} (# + x), PrimeQ], x++]; x] &, 86, 2] (* _Michael De Vlieger_, Dec 27 2019 *) %o A329457 (PARI) a(n) = my(x=1); while (!isprime(n*x + n + x) || !isprime(n*x - n - x), x++); x; \\ _Michel Marcus_, Nov 14 2019 %Y A329457 Cf. A000040, A196660. %K A329457 nonn %O A329457 2,1 %A A329457 _Alex Ratushnyak_, Nov 13 2019