OFFSET
0,2
COMMENTS
MATHEMATICA
f[n_] := Count[IntegerPartitions[n, {2}], _?(And @@ PrimeQ[#] &)]; seq[max_] := Module[{s = Table[0, {max}], n = 1, c = 0, k}, While[c < max, k = f[n]; If[k < max && s[[k + 1]] == 0, c++; s[[k + 1]] = n]; n++]; s]; seq[50] (* Amiram Eldar, Mar 11 2022 *)
PROG
(Python)
from itertools import count
from sympy import nextprime
def A352296(n):
if n == 0:
return 1
pset, plist, pmax = {2}, [2], 4
for m in count(2):
if m > pmax:
plist.append(nextprime(plist[-1]))
pset.add(plist[-1])
pmax = plist[-1]+2
c = 0
for p in plist:
if 2*p > m:
break
if m - p in pset:
c += 1
if c == n:
return m
CROSSREFS
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Mar 11 2022
STATUS
approved