%I #18 Feb 28 2023 09:39:08
%S 5,3,2,2,5,2,3,2,3,3,5,2,19,2,3,3,5,2,3,2,3,3,7,2,7,5,3,7,7,2,3,2,5,3,
%T 5,3,3,2,7,3,5,2,7,2,3,19,7,2,3,5,3,3,5,2,3,5,3,7,7,2,19,2,5,3,7,3,7,
%U 2,3,3,5,2,67,2,3,3,5,5,3,2,11,3,5,2,7,11
%N a(n) is the smallest prime q such that n(q-1)-1 is prime, that is, the smallest prime q so that n = (p+1)/(q-1) with p prime; or a(n) = -1 if no such q exists.
%C Variation on Schinzel's Hypothesis.
%H Paolo P. Lava, <a href="/A249802/b249802.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SchinzelsHypothesis.html">Schinzel's Hypothesis</a>
%e For n=1 the minimum primes p and q are 3 and 5: (p+1)/(q-1) = (3+1)/(5-1) = 4/4 = 1. Therefore a(1)=5.
%e For n=2 the minimum primes p and q are 3 and 3: (p+1)/(q-1) = (3+1)/(3-1) = 4/2 = 2. Therefore a(2)=3. Etc.
%p with(numtheory): P:=proc(q) local k,n;
%p for n from 1 to q do for k from 1 to q do
%p if isprime(n*(ithprime(k)-1)-1) then print(ithprime(k)); break; fi;
%p od; od; end: P(10^5);
%o (PARI) a(n) = my(q=2); while(! isprime(n*(q-1)-1), q = nextprime(q+1)); q; \\ _Michel Marcus_, Nov 07 2014
%Y Cf. A060324, A062251, A064632, A249800, A249801, A249803.
%K nonn,easy
%O 1,1
%A _Paolo P. Lava_, Nov 06 2014
|