I am trying to solve multiple instances of the same problem using FindInstance.
myList={}
listP={3,5,7,..}
For[v = 1, v <= Length[listP], v++, Print[v];
myList = Append[myList,
FindInstance[a*a + b*b == listP[v] && a > 0 && b >= a, {a, b},
Integers, 100000]]]
There is a message FindInstance : The system contains a nonconstant expression
I do not know why listP[v] is nonconstant. Do you ?
listP[[v]]instead oflistP[v]. Btw if you are new to Mathematica please consider reading why to avoidForloops. – Ali Hashmi May 22 '17 at 19:26