Solution
From condition (d), we have (A,B,C)=(B−D,B,B+D) and (b,a,c)=(a−d,a,a+d).
Now, we substitute these values in. Condition (c) states that p∣B−D−a, p∣B−a+d, and p∣B+D−a−d. We subtract the first two to get p∣−d−D, and we do the same for the last two to get p∣2d−D. We subtract these two to get p∣3d. So p∣3 or p∣d. The second case is clearly impossible, because that would make c=a+d>p, violating condition (b). So we have p∣3, meaning p=3. Condition (b) implies that (b,a,c)=(0,1,2) or (a,b,c)∈(1,0,2)→(−2,0,2) (D≡2 mod 3).
Now we return to condition (c), which now implies that (A,B,C)≡(−2,0,2)(mod3). Now, we set B=3k for increasing positive integer values of k. B=0 yields no solutions. B=3 gives (A,B,C)=(1,3,5), giving us 1 solution. If B=6, we get 2 solutions, (4,6,8) and (1,6,11). Proceeding in the manner, we see that if B=48, we get 16 solutions. However, B=51 still gives 16 solutions because Cmax=2B−1=101>100. Likewise, B=54 gives 15 solutions. This continues until B=96 gives one solution. B=99 gives no solution. Thus, N=1+2+⋯+16+16+15+⋯+1=2⋅216(17)=16⋅17=272.
Solution 2
Let (A,B,C) = (B−x,B,B+x) and (b,a,c)=(a−y,a,a+y). Now the 3 differences would be
\label1\label2\label3A−a=B−x−aB−b=B−a+yC−c=B+x−a−y
Adding equations (1) and (3) would give 2B−2a−y. Then doubling equation (2) would give 2B−2a+2y. The difference between them would be 3y. Since p∣{(1),(2),(3)}, then p∣3y. Since p is prime, p∣3 or p∣y. However, since p>y, we must have p∣3, which means p=3.
If p=3, the only possible values of (b,a,c) are (0,1,2). Plugging this into our differences, we get
A−a=B−x−1(4)B−b=B(5)C−c=B+x−2(6)
The difference between (4) and (5) is x+1, which should be divisible by 3. So x≡2mod3. Also note that since 3∣(5), 3∣B. Now we can try different values of x and B:
When x=2, B=3,6,...,96⇒32 triples.
When x=5, B=6,9,...,93⇒30 triples..
... and so on until
When x=47, B=48,51⇒2 triple.
So the answer is 32+30+⋯+2=272
~SoilMilk