Hello,
IMHO, there is no formula (that I am aware of; maybe some arithematic progression somewhere
) as such to achieve what you are requesting for.
Rather what is advisable is to build a business logic around the requirement given to you; which in turn becomes the 'formula', or more aptly put - the algorithm.
How about doing something as:
COMPUTE A = FUNCTION RANDOM (1132237456754)
DISPLAY 'A:' A.
IF (A < 100)
COMPUTE B = A + 999
COMPUTE C = FUNCTION RANDOM(B)
DISPLAY 'C:' C
ELSE
IF (A > 1999)
COMPUTE D = A - 999
COMPUETE E = FUNCTION RANDOM(D)
DISPLAY 'E:' E
END-IF
END-IF.
The above piece is not a solution for your requirement, it is just a sample code to show you what you can do with an algorithm; as a beginner, you can resort to hit-trial for a range of values which you can use; it is not necessary that you use FUNCTION RANDOM, what we usually do is build our own logic to generate a PSEUDO-RANDOM number, seldom using system time as input and playing around it.
So, once again, think of an algorithm, play around it; that will help you explore more functions as well, and improve your programming/analytical skills.
Good luck!