A Semigroup is called quasicommutative if for all elements $a,b$ there is some $r≥1$ such that $$ab=b^ra$$
We know that every commutative semigroup is also quasicommutative, so we can make lots of examples for quasicommutative semigroups by regarding a commutative one. But I am looking for a non-commutative, finite quasicommutative semigroup. In fact, I am searching for a sample of such to see this structure work. Any help would be appreciated.
I have not yet found a non-group example, but the quaternion group $Q$ of order $8$ satisfies $b^{3}a = ab$, whenever $ba \neq ab$, for $a,b\in Q$. I checked this in Maple, but you could easily check it in GAP as well.
Furthermore (assuming that I haven't made a programming error), this is the smallest non-commutative example. Using the Magma package in Maple, I checked the semigroups of order less than $8$ and did not find any non-commutative examples. (I seem to recall there is a library of small semigroups in GAP, so you could double-check my calculations there too.)
ADDED:
For a finite group $G$, your conditions are equivalent to $G$ being Hamiltonian; that is, non-abelian but having all subgroups normal since, for $a$ and $b$ in $G$, we have $ab = b^{r}a$, for some $r\geq 1$ if, and only if, $aba^{-1}\in\langle b\rangle$. The quaternion group $Q$ of order $8$ is the smallest Hamiltonian group. (It follows that there are no smaller group examples.) Checking that $r\in \{1,3\}$ works is straight-forward in Maple:
To check the semigroups of order less than $8$, I used the Magma package in Maple, together with the following routine to check whether a semigroup given by its Cayley table is quasi-commutative.
This procedure takes a semigroup $s$ given by its Cayley table as first argument, along with the order $n$. It uses the fact that we need only check values of $r$ in $\{ 1, 2, \ldots, n\}$, for a semigroup of order $n$, because the sequence $b, b^{2}, b^{3},\ldots, b^{n}$ must eventually end up in a cycle. I supplied sufficient type information to enable the procedure to be compiled to machine code (option autocompile), since it will be called many, many times.
To run the test, I just used the Enumerate command in the Magma package, as follows:
and so on, up to $N = 7$. The output in each case was the empty list.
I'm trying a slight refinement of this approach to see if I can find any non-group examples of order $8$, but I'm not certain the computation is doable. (I'm going to run it overnight and see if it gets anywhere.) Order $9$ is probably not approachable this way; according to very recent (2013/01/25) work of Distler and Kelsey, the number of semigroups of order $9$ (up to isomorphism) is $105978177936292$.
ADDED (2):
It seems that the quaternion group of order $8$ is the only example of that order. To check this, I had to modify the predicate for use with the test option of the Enumerate command. Although I doubt Magma:-Enumerate could list all the semigroups of order $8$ (in principle, it can, but would likely take a very long time), the modified predicate can be used to prune the search tree. I wasn't sure even this would complete, but it did. The modified predicate is as follows. The main difference is the need to check whether "products" are defined (non-$0$).
To call this, use
I found the resulting list had only one member, which I verified was $Q$.
Well, that was fun. Interesting question!