All solutions of Pythagorean equation (P-equation) x
1
2
+ x
2
2
= x
3
2
in relatively free rings of varieties of n-nilpotent associative or associative-commutative rings (n=3,4) are described.
In particular, it is shown that Pythagorean equation has no minimal and complete set of solutions in free rings of such varieties,
so unification type of these varieties is nullary. This is also valid for the variety of associative-commutative 3 (or 4)-nilpotent
rings of characteristic two.