Solution:
In general, Top(r,s)=gcd(r,s)r. We characterize all possible (a,z) as follows.
Claim 1. For any positive integers a and z, we have Top(a,z)=Top(z,a−1) if and only if there exists positive integers d and e such that e∣d2−1, a=d2, and z=de.
Proof. (⇐) From e∣d2−1, we deduce that gcd(d,e)=1. Thus, Top(a,z)=gcd(d2,de)d2=dd2=d. We also have gcd(z,a−1)=gcd(de,d2−1)=e, so Top(z,a−1)=ede=d as well.
(⇒) Let d=gcd(a,z) and e=gcd(z,a−1). We have that gcd(d,e)=1 because it divides both a and a−1. The equation implies that da=ez, or za=ed. The left side has simplified form z/da/d, and the right side is already simplified. Thus, a=d2 and z=de. Finally, e=gcd(z,a−1)∣a−1=d2−1.
The condition that 200≤a≤300 implies d∈{15,16,17}. Once we select d, each divisor e of d2−1 yields a solution. Thus, the answer is
τ(152−1)+τ(162−1)+τ(172−1)=τ(14⋅16)+τ(15⋅17)+τ(16⋅18)=12+8+18=38
where τ(n) is the number of divisors of n.