OFFSET
1,5
EXAMPLE
a(14)=3, because 28=5+23 (3rd and 9th prime) and 28-1, 28-2, 28-3 are not primes.
PROG
(PARI) a(n) = {tn = 2 * n; ideb = 0; ok = 0; while (! ok, if (ideb == 0, pj = tn -1, pj = tn - prime(ideb)); if (isprime(pj) || (pj == 1), ok = 1, ideb++); ); return (ideb); } \\ Michel Marcus, Aug 29 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
David Stroup, Jul 23 2004
EXTENSIONS
Terms corrected by Michel Marcus, Aug 29 2013
STATUS
approved