Here's a prime number program I just wrote for you:
PROGRAM:PRIME
:Prompt N
:{2→ L₁
:For(I,3,N,2
:If min(fpart(I/L₁
:augment(L1,{I→ L₁
:End
:L₁
This program will find all prime numbers from 2 to N. I optimized it using Ti-BASIC's list arithmetic as well as the fact that the only even prime number is two. I then revised this program to fit your specification and take a range (a,b). The result is below:
PROGRAM:PRIME
:Prompt A,B
:{2→ L₁
:For(I,3,B,2
:If min(fpart(I/L₁
:augment(L₁ ,{I→ L₁
:End
:SortD(L₁
:1→ I
:Repeat A>L₁ (I
:I+1→ I
:End
:I-1→ dim(L₁
:SortA(L₁
:L₁
To make this program work, make sure that A is less than B, that A is greater than two, and that there are prime numbers between A and B. If any of these conditions are not met, the program will not function properly.
I would be happy to write some more programs for you. However, I will not accept pay.