  A group is sofic when every finite subset can be well approximated in a
finite symmetric group. No example of a non-sofic group is known. Higman's
group, which is a circular amalgamation of four copies of the Baumslag--Solitar
group, is a candidate. Here we contribute to the discussion of the problem of
its soficity in two ways.
  We construct variations on Higman's group replacing the Baumslag--Solitar
group by other groups $G$. We give an elementary condition on $G$, enjoyed for
example by $\mathbb{Z} \wr \mathbb{Z}$ and the integral Heisenberg group, under
which the resulting group is sofic.
  We then use soficity to deduce that there exist permutations of $\mathbb{Z} /
n\mathbb{Z}$ that are seemingly pathological in that they have order dividing
four and yet locally they behave like exponential functions over most of their
domains. Our approach is based on that of Helfgott and Juschenko, who recently
showed the soficity of Higman's group would imply some the existence of some
similarly pathological functions. Our results call into question their
suggestion that this might be a step towards proving the existence of a
non-sofic group.
