Both of your sentences are correct, and sometimes you also find a third variation that also is correct:
Seien A = {1, 2} und B = {2, 3}. Bestimmen Sie A ∩ B.
So we have:
- Gegeben sind ... (Gegeben ist ...)
- Gegeben seien ... (Gegeben sei ...)
- Seien ... (Sei ...)
According to my observation #3 is the most frequent form in mathematical texts, then comes 2 and then 1.
But this is true only for mathematical texts! In everyday German you will find almost only version 1. So, a Google ngram doesn't help much here, because in an ngram all types of texts are mixed with an unknown mixing ratio.
Some types of texts have their own grammatical "extensions". For example in cooking recipes you will find almost only sentences in active voice without a subject which semantically are commands (so all verbs should be written in their imperative form), but all verbs are in indicative mode, so grammatically they are statements without a subject:
Butter, Zucker und Vanillezucker in einer Schüssel schaumig schlagen. Die Eier einrühren. Den fertigen Gugelhupf mit Staubzucker bestreuen.
Also Lawers use a very specific style which bends German grammar to its limits:
Ist eine Willenserklärung nach § 118 nichtig oder auf Grund der §§ 119, 120 angefochten, so hat der Erklärende, wenn die Erklärung einem anderen gegenüber abzugeben war, diesem, andernfalls jedem Dritten den Schaden zu ersetzen, den der andere oder der Dritte dadurch erleidet, dass er auf die Gültigkeit der Erklärung vertraut, jedoch nicht über den Betrag des Interesses hinaus, welches der andere oder der Dritte an der Gültigkeit der Erklärung hat.
And so also mathematicians have their own constructions which would be considered to be using wrong grammar if they were "normal" texts, but in texts written from mathematicians to mathematicians they are perfectly correct.