EDIT : precision and broadening of my question.
Almost all is in the title : I am looking for various structures $A$ such $A^n$ and $A^m$ (products of $A$) are isomorphic (in the sense that it is compatible with at least one structure of $A$, e.g. group or ring if $A$ is a ring...) and moreover $n\neq m$
For example, I'm looking for groups, rings, modules, vector spaces (when the sets at stake exist), whichever commutative or not. Simple and basic examples are welcome, I am not researcher...
Extension possible of the question to $A^{(I)} \simeq A^{(J)}$ (external direct sums for structures for which this makes sense) with $card(I)\neq card(J)$.
This question may be a classic one but I can't find the answer neither in book nor here. Please redirect me if possible...
Thanks
Edit bis : references are welcome (it doesn't mean I dont trust answers, but often, books have very interesting comments before or after examples that can't always be put in the answers here... ;))
The two standard examples (given in multiple places on the site, but perhaps not easy to find directly) are these:
If $F$ is a field, and $R=\prod_{i\in \Bbb N}F$ is the ring direct product, then $R\cong R^m$ as rings for whatever positive integer $m$ you wish.
On the other hand, it is impossible for $R^m\cong R^n$ with $n\neq m$ as modules for a nonzero commutative ring $R$. The standard example to find a ring $R$ to allow such an isomorphism is the ring of linear transformations $End(V_k)$ of an infinite dimensional $k$-vector space $V$. It is possible to show that $R\cong R^m$ as $R$ modules for any positive integer $m$ in this ring.