Let us denote by “a” the number of members in one club, by “b” in the other. The total number of all possible matches consisting of the members of different clubs is thus ab, while the total number of all possible couples matching members of the same club is ½a(a-1) for one club and
½b(b-1)for the other.
Hence 2ab= a*(a-1)+b(b-1)
i.e the number representing the population of the island is a square of an integer, say n². So is this number increased by 100, say m².
All we have to do is to find integer solutions for m²-n²=100, or (m+n)(m-n)=100.
The factorization of 100 should be made into two even factors, to assure integer m and n. Two possible solutions are 10*10 or 50*2. One set of equations gives n=0, m=100 (a called trivial solution ), and the n=576, m=676.
Now one can go back and find the appropriate a and b. For the trivial solution 100 equals a+b and 10=a-b (45 and 55 members), and for the non-trivial solution 576 equals a+b and 24=a-b (276 and 300 members),
676 equals a+b and 26=a-b (325 and 351 members).