I want to try to find the largest prime twin under a given number using TI Basic on a Nspire.
I.e. if the number is 8 the program should return:
I thought it should be something like this:
Define grpr2(x)= Prgm If isPrime(x-1) -> a Then isPrime(x-3) -> b Else (x-1) -> x Endif Disp a, b EndPrgm
Obviously I'm doing something wrong. I think it has to do with defining a and b, but I have no idea what. Can someone help me?