login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112823 Greatest p less than or equal to n with p and q both prime, p+q = 2n. 6
2, 3, 3, 5, 5, 7, 5, 7, 7, 11, 11, 13, 11, 13, 13, 17, 17, 19, 17, 19, 13, 23, 19, 19, 23, 23, 19, 29, 29, 31, 23, 29, 31, 29, 31, 37, 29, 37, 37, 41, 41, 43, 41, 43, 31, 47, 43, 37, 47, 43, 43, 53, 47, 43, 53, 53, 43, 59, 59, 61, 53, 59, 61, 59, 61, 67, 53, 67, 67, 71, 71, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

Essentially the same as A002374, which is the main entry for this sequence. [Franklin T. Adams-Watters, Jan 25 2010]

LINKS

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

FORMULA

a(n) = n - A047160(n). [Jason Kimberley, Aug 31 2011]

MATHEMATICA

f[n_] := Block[{p = n/2}, While[ !PrimeQ[p] || !PrimeQ[n - p], p-- ]; p]; Table[ f[n], {n, 4, 146, 2}]

PROG

(PARI) a(n) = {my(p = precprime(n)); while (!isprime(2*n-p), p = precprime(p-1)); p; } \\ Michel Marcus, Oct 22 2016

CROSSREFS

Cf. A002374, A020481, A047160.

Sequence in context: A238527 A146071 A167411 * A247176 A185075 A074399

Adjacent sequences:  A112820 A112821 A112822 * A112824 A112825 A112826

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Sep 05 2005

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 February 18 20:04 EST 2019. Contains 320262 sequences. (Running on oeis4.)