%I #16 Aug 16 2018 13:26:29
%S 3,5,7,7,11,13,13,17,19,19,23,23,17,29,31,31,29,37,37,41,43,43,47,47,
%T 41,53,53,47,59,61,61,59,67,67,71,73,73,71,79,79,83,83,53,89,89,83,89,
%U 97,97,101,103,103,107,109,109,113,113,107,113,103,113,107,127,127,131,131,113,137,139,139
%N a(n) is the greatest prime p such that (2*n+1-p)/2 is prime.
%C Lemoine's conjecture, also called Levy's conjecture, says a(n) exists for all n >= 3.
%H Robert Israel, <a href="/A302564/b302564.txt">Table of n, a(n) for n = 3..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lemoine%27s_conjecture">Lemoine's conjecture</a>
%p Lemoine:= proc(x) local s;
%p s:= x;
%p while s > 3 do
%p s:= prevprime(s);
%p if isprime((x-s)/2) then return s fi
%p od;
%p end proc:
%p seq(Lemoine(2*n+1),n=3..100);
%o (PARI) a(n) = {my(p = precprime(2*n+1)); while (!isprime((2*n+1-p)/2), p = precprime(p-1)); p;} \\ _Michel Marcus_, Aug 16 2018
%Y Cf. A046927, A103506.
%K nonn
%O 3,1
%A _Robert Israel_, Aug 15 2018