

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. AdamsWatters, 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*np), p = precprime(p1)); 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



