A Set of $n$ Numbers Where Any $k$ Taken Together Sum to a Prime Not too long ago, I saw an interesting question on this site that was asking about the maximum value of $n$ if there exist $n$ numbers such that any $3$ of them taken together sum to a prime. However, before I could answer it, the question was deleted. I am interested in a generalisation of this question. Hence, my question is:
Let $k$ be an arbitrary natural number. What is largest natural number $n\ge k$ such that there are $n$ natural numbers from which any arbitrary selection of $k$ numbers add up to a prime?
Small values of $k:$
$k=1:$
Here, $n$ can be any natural number. We just have to take a set of $n$ primes.
$k=2:$ This is where things start to get interesting. Since if two numbers sum up to an odd prime, they must be of different parity, we get that the maximum value of $n$ is $2.$
$k=3:$ Taking modulo $3$, we get that in this set of $n$ numbers, we can have reminders $0,1,2.$ Since no $3$ of them taken together must be divisible by $3,$ we get that $n≤6.$ If $n$ were greater than $6$, then we could find $3$ numbers with the same remainder modulo $3.$ But, we can do better. Suppose $S_3$ is an ordered $6$-tuple of $6$ numbers taken modulo $3$. Let $S_3=(0,1,2,0,1,2).$ Note that if $S_3$ were anything else, then too, we could find $3$ numbers such that they have the same remainder modulo $3.$ Hence, if we prove that this set isn't possible, we will be done with the $n=6$ case. In $S_3,$ we can pick the first three numbers. They have remainders $0,1,2.$ Since their sum is $0$ modulo $3,$ this number is either a multiple of $3,$ or $3$ itself. But, this number cannot be $3$ as there is only way to partition $3$ into $3$ natural numbers:$1+1+1.$ Since this number is a multiple of $3,$ and hence cannot be prime, we are done. So, $n≤5.$ With a bit of casework, it's not too tough to show that $n=5$ isn't possible either. So, $n≤4.$
$k≥4:$ This is where I need your help. Following the trend, I took modulo $k.$ I have a sort of upper bound for $n.$ Again, let $S_k$ be an ordered $n$-tuple of $n$ numbers taken modulo $k.$ Now, $S_k$ cannot have the block $(0,1,2,\ldots,k-1)$ repeating $k$ times. If it did have this block $k$ times, we would again be able to find a number that's divisible by $k.$ In fact, by the same argument, we get that this block can be present at most $k-1$ times. Hence, $n≤k(k-1).$ But, like we saw before, we may be able to do better than $n≤k(k-1).$ Note that I am using the block $(0,1,2,\ldots,k-1)$ to find the upper bound, as if the block were anything else, we would find $k$ numbers with the same remainder modulo $k$ quicker.
 A: Here's a partial answer.
The maximum possible value of $n$ is $k$ if $k$ is even. If $k$ is odd, then $n\leq 2k-2$.
We first treat the case where $k$ is even. In this case, it is clearly possible to get $n=k$, since there exists a prime number exceeding $k(k+1)/2$, which is thus the sum of $k$ distinct natural numbers. So, it suffices to show that, given any set $S$ of $k+1$ natural numbers, some subset of $S$ with size $k$ has composite sum. Let $s$ be the sum of the elements of $S$, so that the subsets of $S$ with size $k$ have sums $s-a$ for every $a\in S$. Since any such sum is the sum of $k$ distinct positive integers, it is strictly greater than $k$, implying that $s-a$ is odd for all $a\in S$. However, if $S=\{a_1,\dots,a_{k+1}\}$, then
$$s=a_1+\cdots+a_{k+1}\equiv (s-1)+\cdots+(s-1)=(k+1)(s-1)\equiv s-1\pmod 2,$$
a contradiction. (We have used the fact that $k$ is even in the last step).
In the case where $k$ is odd, we have tha any set of $2k-1$ integers contains a subset of size $k$ divisible by $k$. So, $n$ must be at most $2k-2$. If $n=2k-2$, there will be no "modulo $k$ obstruction," as we can choose our set to consist of $k-1$ numbers which are divisible by $k$ and $k-1$ numbers which are $1\pmod k$, but there may be other obstructions.
A: Let me present @CarlSchildkraut statement
$$ \forall_{\,k\in\mathbb N}\quad(2|k\ \rightarrow 
   \ n(k)=k) $$
in my way     (indeed, I was not able to follow the original}).
Proof:     Let $\ S\ $ be an arbitrary $(k+1)$-set of natural numbers such that $ \sum S-x\ $ is prime for every $\ x\in S\ $ (a proof by a contradiction).
Since natural $\ k\ $ is even, $\ k>1,\ $ hence $ \sum S-x\ $ is a sum of at least two different natural numbers (members of $\ S$) hence
$$ \sum S-x\ \ge\ 3 $$
-- this means that all primes $\ \sum S-x\ $ are odd (i.e. $\ > 2$). It follows that all
$$ x\,\ =\,\ \sum S\ -\ \left(\sum S-x\right) $$
have the same parity (the opposite parity to $\ \sum S$). Thus, prime $\ \sum S-x\ $  is a sum of $\ k\ $ summands $\ y\in S;\ $ however, $\ k\ $ is even, and all said summands $\ y\ $ have the same parity hence $\ \sum S-x\ $ is even -- a contradiction since these primes were odd.
End of Proof

PS. Of course, $\ n(k) \ge k\ $ for every natural $k$ -- just stop for a moment to think about it, and it will be obvious.
