Collect all the under roots (Square Root: For instance 4 under root is 2) of all the positive integers between 1 to 100000 which are prime numbers in an array. Randomize the order of an array such that only ONE random triplet is in original order with exact same indices.
For instance, if input would have been 50, under root array would have been as following in ascending order:
$input = 50;
$ordered_output = [1, 2, 3, 5, 7];
and after randomize output would have been any one of the following but random everytime: