I have a problem involving algebraic structures. Any help I can get here would be amazing.
Problem: We have a set $A$, $\text{card} A = n$, $n \in \Bbb N$. Find the number of different magmas that have $A$ as the underlying set.
(I hope I translated this correctly. Feel free to point out if something is wrong or not clear.)
My idea:
Following the definition, any operation I make needs to have the results within that set. So, for example, I imagined a table where we have some operation * and numbers $0$ and $1$ from set $\{0,1\}$: $$ \begin{array}{c|lcr} * & \text{0} & \text{1} & \\ \hline 0 & 0 & 1 \\ 1 & 1 & 0 \ \end{array} $$
That would be one operation with those two numbers. It depends how I define my operation, thus I can make more. I could make:
$ \begin{array}{c|lcr} *_1 & \text{0} & \text{1} & \\ \hline 0 & 0 & 0 \\ 1 & 0 & 0 \ \end{array} $ or $ \begin{array}{c|lcr} *_2 & \text{0} & \text{1} & \\ \hline 0 & 1 & 0 \\ 1 & 0 & 1 \ \end{array} $ or $ \begin{array}{c|lcr} *_3 & \text{0} & \text{1} & \\ \hline 0 & 1 & 1 \\ 1 & 1 & 1 \ \end{array} $
So, if I take $n$ numbers and place into this table, I could make $n$ operations. Would results be $n^{2^n}$=$n^{2n}$ ?
Thank you.
Edit: added more explanation.
The operation $*\colon A \times A \to A$ maps each (ordered) pair $(a, b)$ of elements of $A$ to some element $a * b \in A$. There are no restrictions at all on the operation, so that each pair $(a, b)$ has $|A| = n$ "options" for its image (independent of what the image of any other pair might be). The operation $*$ (and hence the magma on $A$) is completely determined by this mapping, and therefore, the number of possible magmas on $A$ is \begin{equation*} |A|^{|A \times A|} = n^{n^2}. \end{equation*}
Alternatively, we can divide the reasoning into two parts in a more obvious manner.