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 A051686 #15 Jul 27 2016 02:20:34 %S A051686 2,3,2,2,3,3,2,7,2,2,3,3,2,7,2,3,3,2,5,7,3,2,3,2,2,3,2,2,19,3,5,3,3,2, %T A051686 3,13,2,3,2,3,19,5,2,7,2,3,3,2,2,7,3,3,7,5,3,3,2,2,7,2,3,3,3,2,7,3,2, %U A051686 3,2,2,13,3,2,37,5,3,3,2,2,13,3,5,3,2,11,13,2,2,31,3,3,7,2,5,3,3,2,7,2,2 %N A051686 Smallest prime p such that 2n*p+1 is also prime. %C A051686 These are the primes arising in A051899. %H A051686 Michael De Vlieger, <a href="/A051686/b051686.txt">Table of n, a(n) for n = 1..10000</a> %e A051686 a(29)=19 because 19 is the smallest prime p such that 2*29*p+1 is prime. %t A051686 Table[k = 1; While[! PrimeQ[2 n Prime@ k + 1], k++]; Prime@ k, {n, 120}] (* _Michael De Vlieger_, Jul 26 2016 *) %o A051686 (PARI) a(n) = p=2; while(!isprime(2*n*p+1), p = nextprime(p+1)); p; \\ _Michel Marcus_, Dec 10 2013 %Y A051686 Cf. A005384, A051644-A051654, A051899. %K A051686 nonn %O A051686 1,1 %A A051686 _Labos Elemer_