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!)
A066285 a(n) is the minimal difference between primes p and q whose sum is 2n. 6
0, 0, 2, 0, 2, 0, 6, 4, 6, 0, 2, 0, 6, 4, 6, 0, 2, 0, 6, 4, 18, 0, 10, 12, 6, 8, 18, 0, 2, 0, 18, 8, 6, 12, 10, 0, 18, 4, 6, 0, 2, 0, 6, 4, 30, 0, 10, 24, 6, 16, 18, 0, 14, 24, 6, 8, 30, 0, 2, 0, 18, 8, 6, 12, 10, 0, 30, 4, 6, 0, 2, 0, 30, 8, 6, 12, 10, 0, 18, 4, 30, 0, 10, 24, 6, 28, 18, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,3

COMMENTS

Terms are always even numbers because primes present in Goldbach partitions of n > 4 are odd and n = 4 has just one partition (2+2) where the difference is 0. a(n) = 0 iff n is prime. - Marcin Barylski, Apr 28 2018

LINKS

Table of n, a(n) for n=2..89.

FORMULA

a(n) = 2 * A047160(n). - Alois P. Heinz, Jun 01 2020

MATHEMATICA

a[n_] := For[p=n, True, p--, If[PrimeQ[p]&&PrimeQ[2n-p], Return[2n-2p]]]

PROG

(PARI) a(n) = {forstep(k=n, 1, -1, if (isprime(k) && isprime(2*n-k), return(2*n-2*k)); ); } \\ Michel Marcus, Jun 01 2020

CROSSREFS

Cf. A002372, A047160, A065978, A066286, A303603.

Sequence in context: A136581 A175950 A339423 * A327873 A136665 A047765

Adjacent sequences:  A066282 A066283 A066284 * A066286 A066287 A066288

KEYWORD

nonn,easy

AUTHOR

Dean Hickerson, Dec 12 2001

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 30 07:18 EDT 2021. Contains 346348 sequences. (Running on oeis4.)