Solution:
Claim 1. Let a and b be positive integers. Then, gcd(a3−b3,(a−b)3) is squarefree if and only if gcd(a,b)=1, a−b is squarefree, and a−b is not divisible by 3.
Proof. If gcd(a,b)=d>1, then g is divisible by d3, hence not squarefree. Thus, we now restrict our attention to the case gcd(a,b)=1. In that case, we factor out a−b from the gcd and simplify it as follows:
gcd(a3−b3,(a−b)3)=(a−b)gcd(a2+ab+b2,(a−b)2)=(a−b)gcd((a−b)2+3ab,(a−b)2)=(a−b)gcd((a−b)2,3ab)
Moreover, since gcd(a,b)=1, we have that gcd(a−b,a)=gcd(a−b,b)=1, and so gcd((a−b)2,ab)=1, which implies that gcd((a−b)2,3ab) is either 1 or 3.
Thus, each of the following is equivalent to the next.
- gcd(a3−b3,(a−b)3) is squarefree.
- (a−b)gcd((a−b)2,3ab) is squarefree.
- a−b is squarefree and at least one of a−b and gcd((a−b)2,3ab) is not divisible by 3.
- a−b is squarefree and a−b is not divisible by 3.
The claim implies that c=a−b is possible only if c is squarefree and not divisible by 3. For any such c, we may construct (a,b) that works by taking a=c+1 and b=1. Hence, the answer is simply the number of squarefree integers up to 50 that are not divisible by 3.
There are 16 multiples of 3 from 1 to 50. Among the remaining numbers, 4,8,16,20,28,32,40,44,25,50, and 49 are not squarefree. This leaves 50−16−11=23 possible values of a−b.