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 A249800 #25 Feb 16 2025 08:33:24 %S A249800 3,2,3,2,5,2,3,11,3,2,5,2,3,2,3,5,5,3,11,2,5,2,5,2,3,2,3,3,7,5,11,2,5, %T A249800 2,5,2,3,5,3,5,17,2,3,7,3,2,5,3,3,2,5,2,13,2,5,5,3,3,11,2,5,5,5,2,7,2, %U A249800 3,5,3,2,7,5,3,2,7,2,5,3,3,2,5,113,5,3,11 %N A249800 a(n) is the smallest prime q such that n(q+1)+1 is prime, that is, the smallest prime q such that n = (p-1)/(q+1) with p prime; or a(n) = -1 if no such q exists. %C A249800 Variation on Schinzel's Hypothesis. %H A249800 Paolo P. Lava, <a href="/A249800/b249800.txt">Table of n, a(n) for n = 1..1000</a> %H A249800 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SchinzelsHypothesis.html">Schinzel's Hypothesis</a>. %e A249800 For n=1 the minimum primes p and q are 5 and 3: (p-1)/(q+1) = (5-1)/(3+1) = 4/4 = 1. Therefore a(1)=3. %e A249800 For n=2 the minimum primes p and q are 7 and 2: (p-1)/(q+1) = (7-1)/(2+1) = 6/3 = 2. Therefore a(2)=2. %p A249800 with(numtheory): P:=proc(q) local k,n; %p A249800 for n from 1 to q do for k from 1 to q do %p A249800 if isprime(n*(ithprime(k)+1)+1) then print(ithprime(k)); break; fi; %p A249800 od; od; end: P(10^5); %t A249800 a249800[n_Integer] := Module[{q}, q = 2; While[CompositeQ[n (q + 1) + 1], q = NextPrime[q]]; q]; a249800/@Range[120] (* _Michael De Vlieger_, Nov 19 2014 *) %o A249800 (PARI) a(n) = my(q=2); while(! isprime(n*(q+1)+1), q = nextprime(q+1)); q; \\ _Michel Marcus_, Nov 07 2014 %Y A249800 Cf. A060324, A062251, A064632, A249801, A249802, A249803. %K A249800 nonn,easy %O A249800 1,1 %A A249800 _Paolo P. Lava_, Nov 06 2014