login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A098170
Smallest prime p such that prime(n)#/2 + 2*p is prime where p > 3, except p=2 for n=1.
2
2, 5, 7, 11, 13, 19, 29, 31, 29, 31, 41, 41, 43, 83, 59, 83, 163, 97, 193, 89, 89, 173, 113, 107, 131, 157, 131, 109, 113, 467, 151, 239, 167, 263, 233, 211, 251, 167, 599, 199, 199, 211, 313, 241, 509, 887, 307, 227, 419, 479, 317, 269, 653, 281, 307, 277, 499
OFFSET
1,1
LINKS
EXAMPLE
For n=4, A002110(4)/2=210/2=105. 105+2*5 is not prime. 105+2*7 is not prime. 105+2*11 is prime, so a(4)=11.
MAPLE
A098170 := proc(n)
local pri, j, jmin;
pri := A002110(n)/2 ;
if n = 1 then
jmin := 1;
else
jmin := 3;
end if;
for j from jmin do
if isprime(pri+2*ithprime(j)) then
return ithprime(j) ;
end if;
end do:
end proc: # R. J. Mathar, Apr 12 2017
MATHEMATICA
Primorial[n_Integer] := Block[{k = Product[ Prime[ j], {j, n}]}, k]; f[n_] := Block[{p = Primorial[n]/2}, If[n == 1, j = 1, j = 2]; While[ !PrimeQ[p + 2Prime[j]], j++ ]; Prime[j]]; Table[ f[n], {n, 57}] (* Robert G. Wilson v, Sep 04 2004 *)
CROSSREFS
The indices of the p are in A098171.
Sequence in context: A074833 A293859 A045347 * A256396 A291280 A120330
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 30 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Sep 04 2004
STATUS
approved