login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096142 Let p(0) = 1, p(k) = k-th prime for k >= 1; write 2n = p(i) + p(j) with i <= j and i minimal; sequence gives i. 0
0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 3, 0, 0, 2, 3, 0, 2, 0, 0, 2, 0, 2, 3, 0, 2, 3, 0, 0, 2, 3, 0, 2, 0, 0, 2, 3, 0, 2, 0, 2, 3, 0, 2, 3, 4, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 3, 4, 6, 5, 6, 0, 2, 0, 2, 3, 0, 0, 2, 3, 4, 5, 0, 0, 2, 3, 0, 2, 3, 0, 2, 0, 2, 3, 0, 2, 3, 0, 0, 2, 3, 4, 5, 0, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

LINKS

Table of n, a(n) for n=1..99.

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

Sequence in context: A281453 A079807 A116373 * A216921 A280285 A033719

Adjacent sequences:  A096139 A096140 A096141 * A096143 A096144 A096145

KEYWORD

easy,nonn

AUTHOR

David Stroup, Jul 23 2004

EXTENSIONS

Terms corrected by Michel Marcus, Aug 29 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 12 13:01 EDT 2020. Contains 335661 sequences. (Running on oeis4.)