Artificial intelligent assistant

How many unique decks can you make with a deck size of 30 selected from a total number of 263 cards, 46 unique and 217 which you can have at most 2. How many unique decks can you make when your deck size has to be exactly 30 and you can select them from a total of 263 different cards, 46 of which you can have at most 1 copy and 217 of which you can at most 2 copies of. Edited for clarity.

Unfortunately, one of the easiest ways to approach this is by cases.

Case $n$ (the general case): You will have $n$ pairs of cards which are duplicated. (in a small 8 card example with $n=2$ that would be like [abccdeff] where there are two letters, namely c and f, which are duplicated)

Counting this case: Step 1: Determine which $n$ cards are duplicated. $\binom{217}{n}$

Step 2: Determine what the remaining non-duplicated cards are in the deck. $\binom{217-n+46}{30-2n}$

By multiplication principle then, the resulting number of different decks from case $n$ is $\binom{217}{n}\binom{263-n}{30-2n}$

Ranging through all possible cases $0\leq n \leq 15$ we get

$$\sum\limits_{n=0}^{15}\binom{217}{n}\binom{263-n}{30-2n} \approx 3.5\cdot 10^{40}$$ Wolfram-Alpha Calculations

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d0d964e5cc82459b26e75e4eeb67578d