OFFSET
2,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..10000
EXAMPLE
prime(2)=3, 3+2*2=7 is prime, so a(2)=2;
prime(3)=5, 5+2*3=11 is prime, so a(3)=3;
...
prime(11)=31, 31+2*29=89 is prime, so a(11)=29.
MATHEMATICA
Table[p1 = Prime[n1]; n2 = n1 - 1; p2 = Prime[n2]; While[cp = p1 + 2*p2; ! PrimeQ[cp], n2--; If[n2 == 0, Print[n1]]; p2 = Prime[n2]]; p2, {n1, 2, 201}]
lp[n_]:=Module[{p=NextPrime[n, -1]}, While[!PrimeQ[n+2p], p=NextPrime[p, -1]]; p]; Table[lp[p], {p, Prime[Range[2, 70]]}] (* Harvey P. Dale, Jan 17 2022 *)
PROG
(Haskell)
a114230 n = head [p | let q = a000040 n,
p <- reverse $ takeWhile (< q) a000040_list,
a010051 (q + 2 * p) == 1]
-- Reinhard Zumkeller, Oct 29 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lei Zhou, Nov 18 2005
EXTENSIONS
Edited definition to conform to OEIS style. - Reinhard Zumkeller, Oct 29 2013
STATUS
approved