OFFSET
1,1
COMMENTS
The greater prime p of a twin prime pair is never a term, since p-2 is the lesser prime of that pair. Terms of A013918 are not terms here either because at the (k-1)-th subtraction the result is the k-th prime.
Given comments in A090304, the last term is likely a(56) = 7741. - Michael S. Branicky, Dec 03 2022
EXAMPLE
11 is a term because 11 - 2 = 9, 11 - (2 + 3) = 6, 11 - (2 + 3 + 5) = 1, and none of these are prime.
17 is not a term because 17 - (2 + 3 + 5) = 7, which is prime.
MATHEMATICA
primeQ[n_] := n > 0 && PrimeQ[n]; With[{p = Prime[Range[1000]]}, s = Accumulate[p]; q[n_] := AllTrue[s, ! primeQ[n - #] &]; Select[p, q]] (* Amiram Eldar, Dec 04 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Tamas Sandor Nagy, Dec 03 2022
EXTENSIONS
More terms from Michael S. Branicky, Dec 03 2022
STATUS
approved