Mubashir needs your help to find the Simple Numbers in a given range.
A number X, that has an N amount of digits (which we'll enumerate as d1, d2, ..., dN), is Simple if the following equation holds true:
X = d1^1 + d2^2 + ... + dN^N
89 = 8^1 + 9^2
135 = 1^1 + 3^2 + 5^3
Create a function that returns an array of all the Simple Numbers that exist within a given range between a and b (both numbers are inclusive).
a to b.digit ^ (indexOfTheDigit + 1).simpleNumbers(1, 10) ➞ [1, 2, 3, 4, 5, 6, 7, 8, 9]
simpleNumbers(1, 100) ➞ [1, 2, 3, 4, 5, 6, 7, 8, 9, 89]
simpleNumbers(90, 100) ➞ []
N/A