An example for 0, 1, 2, 3, 4, 5 would be:
f(0)=5;
f(1)=1;
f(2)=0;
f(3)=4;
f(4)=2;
f(5)=3;
I have found f(x) = 911 * x % N to work where 911 can be any large prime number, but I noticed patterns in the list of numbers resulted. In a line chart with the resulted values, they look like fish fins. Not identical of course, the results are unique. It would be splendid if the results would appear more randomly distributed. I don't mind if you fix this function or produce a new one.
I aim to use this to generate random positions for users at website but DO NOT have the ability to pre-generate the shuffled/permuted input. I can only send x values to the server and return f(x). N and the function itself are serverside.
Thank you in advance.