Sequence Equation - HackerRank.
NOTE: If you are copying my code then its an advice to you to copy it after downloading it to avoid any kind of compilation error its link is available at the bottom of the source code. Given a sequence of integers, where each element is distinct and satisfies . For each where , find any integer such that and print the value of on a new line. For example, assume the sequence . Each value of between and , the length of the sequence, is analyzed as follows: , so , so , so , so , so The values for are . Function Description Complete the permutationEquation function in the editor below. It should return an array of integers that represent the values of .