OFFSET
2,1
COMMENTS
LINKS
H. J. Smith, Table of n, a(n) for n = 2..20000
MATHEMATICA
a[n_] := {p, q} /. {ToRules @ Reduce[p+q == 2*n, {p, q}, Primes]} // Max; Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Dec 19 2013 *)
Table[Max[Flatten[Select[IntegerPartitions[2n, {2}], AllTrue[#, PrimeQ]&]]], {n, 2, 70}] (* Harvey P. Dale, Sep 04 2024 *)
PROG
(Haskell)
a020482 = last . a171637_row -- Reinhard Zumkeller, Mar 03 2014
(PARI) a(n)=forprime(q=2, n, if(isprime(2*n-q), return(2*n-q))) \\ Charles R Greathouse IV, Apr 28 2015
(Python)
from sympy import primerange, isprime
def A020482(n): return next(m for p in primerange(2*n) if isprime(m:=(n<<1)-p)) # Chai Wah Wu, Nov 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved