A magma $M$ is said to be power-associative if the subalgebra generated by any element is associative. This can be written simply as $x^mx^n=x^{m+n}$ for all $m,n$ positive integers and $x\in M$, where $x^m$ is defined recursively via $x^1=x$, $x^{n+1}=x^nx$.
This specification requires an infinite set of equations, one for each $m,n$. Is there a way to write the constraint of power-associativity using only a finite number of formulas involving variables in $M$? My guess is no, but how to prove it?
No.
This is a reformulation of the answer of YCor on MO in more elementary terms and with some details filled in.
Suppose that there is a finite set $R$ of relations which generates exactly the power-associative magmas. Because each such relation is derivable from $\{x^mx^n=x^{m+n}\mid m,n\in\Bbb N\}$, by compactness there is an $N>1$ such that all relations in $R$ are derivable from $\{x^mx^n=x^{m+n}\mid m+n\le N\}$. Therefore without loss of generality we can take our finite set of relations to be $\{x^mx^n=x^{m+n}\mid m+n\le N\}$.
Now we claim that $xx^N=a$ is provable only if $a$ has the form $xb$ where $b$ contains $N$ occurrences of $x$. To see this, note that we can only rewrite $xb$ by rewriting $b$ (which yields $xb'$ where $b'$ also has $N$ $x$'s because the relations preserve the number of $x$'s), rewriting $x$ (impossible because all relations in the set contain at least two $x$'s), or rewriting $xb$ itself (which, except for the trivial relation $xx=xx$, would require $b=x^n$ where $1+n\le N$ which is impossible).
Thus in particular $xx^N=x^Nx$ is not provable, even though it is true in all power-associative magmas, which is a contradiction.