Question: why don't these work

This question is related to the Question Using Maple to find Consecutive Primes

being stalled myself here why don't these work?

for i from 1 to 200 do
  if ithprime(i)=prevprime(500) then print i; end if;
end do;

and

solve(ithprime(i)=prevprime(500),i)

??

What would be a better way?  I could do

for i from 1 to 200 while ithprime(i)<500 do end do; i;
                                                               96

to find the value of i for ithprime(i)=prevprime(500)

Please Wait...