An $n$-player prisoner's dilemma where a coalition of 2 players is better off defecting I'm interested in a game kind of like the prisoner's dilemma. The important thing about the 2x2 prisoner's dilemma is that it is efficient if all cooperate, but this is not an equilibrium, because both players have a dominant strategy to defect. 

I have in mind a variant. Suppose $n$ players can choose to cooperate or defect. It is group efficient if all cooperate, but any player would like to defect from that. Further, any coalition of 2 (more generally $k$) players would prefer to defect together. So we could imagine payoffs $u(\text{all defect})=0$, and switching to cooperate increases all individual payoffs by 1, but at a private cost of $2+\epsilon$ (more generally $k+\epsilon&lt;n$). So, it is always better for the group if someone cooperates, but only for a large enough group. 

Is there a name for this kind of thing? Are there any papers or other resources that explore how this differs than the classic prisoner's dilemma?
A public goods game is a generalization of the prisoners dilemma that could cover this.

In a public goods game all players set their individual contribution level $x_i \in [0,\bar{x}]$ where $\bar{x}$ is a given positive parameter. Sometimes instead of an interval there are several discrete options to choose from. Player $i$'s payoff is defined as
$$
- x_i + c \cdot \sum_{j = 1}^{n} x_j
$$
where $c$ is a parameter such that $\frac{1}{n} &lt; c &lt; 1$. In these games it is individually rational to defect (set $x_i = 0$) but the Pareto optimal outcome is to cooperate (meaning $\forall i: x_i = \bar{x}$).

Seems to me that you could adapt this to your problem by narrowing the range of $c$ to $\frac{1}{n} &lt; c &lt; \frac{1}{2}$. In this case a player would prefer even dual defection to himself having to cooperate. Of course these games do not cover the whole game class you described, by they are part of it, and there is a lot of literature on public goods games, though mostly in behavioral economics.