Using Mathematica, I need to define a function of one integer variable that generates the same real number in the range 0 to 1, if it is called with the same argument, but gives a different real number if its argument is changed. For example :
Func = 0.12675, Func = 0.11213, Func = 0.11213, Func = 0.12675, Func = 0.02561,
and so on.
How can I define such a function?
A more precise statement of the pseudo-random nature of the function
The function should generate new numbers for each Mathematica session. So after thousands of sessions, the values
Func are uniformly distributed on the intervall 0 to 1. For a given session,
Func generates the same number again and again. But in the next session,
Func would be a different number. Otherwise, the generated numbers couldn't be considered as "random" if they are always the same.