login
Take smallest prime q such that n*(q+1)+1 is prime (A249800), that is, the smallest prime q so that n = (p-1)/(q+1) with p prime; sequence gives values of p; or -1 if A249800(n) = -1.
4

%I #18 Feb 16 2025 08:33:24

%S 5,7,13,13,31,19,29,97,37,31,67,37,53,43,61,97,103,73,229,61,127,67,

%T 139,73,101,79,109,113,233,181,373,97,199,103,211,109,149,229,157,241,

%U 739,127,173,353,181,139,283,193,197,151,307,157,743,163,331,337,229

%N Take smallest prime q such that n*(q+1)+1 is prime (A249800), that is, the smallest prime q so that n = (p-1)/(q+1) with p prime; sequence gives values of p; or -1 if A249800(n) = -1.

%C Variation on Schinzel's Hypothesis.

%H Paolo P. Lava, <a href="/A249801/b249801.txt">Table of n, a(n) for n = 1..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SchinzelsHypothesis.html ">Schinzel's Hypothesis</a>.

%e 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)=5.

%e 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)=7. 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(n*(ithprime(k)+1)+1);

%p break; fi; od; od; end: P(10^5);

%o (PARI) a(n) = my(q=2); while(! isprime(p=n*(q+1)+1), q = nextprime(q+1)); p; \\ _Michel Marcus_, Nov 07 2014

%Y Cf. A060324, A062251, A064632, A249800, A249802-A249803.

%K nonn,easy,changed

%O 1,1

%A _Paolo P. Lava_, Nov 06 2014