OFFSET
3,1
COMMENTS
Lemoine's conjecture, also called Levy's conjecture, says a(n) exists for all n >= 3.
LINKS
Robert Israel, Table of n, a(n) for n = 3..10000
Wikipedia, Lemoine's conjecture
MAPLE
Lemoine:= proc(x) local s;
s:= x;
while s > 3 do
s:= prevprime(s);
if isprime((x-s)/2) then return s fi
od;
end proc:
seq(Lemoine(2*n+1), n=3..100);
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Aug 15 2018
STATUS
approved