Stuck on USACO-Arithmetic Progression

I have been stuck on this Arithmetic Progressions problem for sometime.

I am confused why series where ( a=1 and d=8 ) or (a=2 and d=4) are not counted in the solution ? These too have well over 5 terms in the series like ( a=2 and d=8 ) which happens to be included in the answer.

Am I missing something ?

a = 1, d = 8: 1 + 4 \cdot 8 = 33 is not a bisquare
a = 2, d = 4: 2 + 1 \cdot 4 = 6 is not a bisquare

1 Like

Thanks @galencolin I figured It out now :smiley: