Ad
  • Custom User Avatar

    if list_squared(m, n), find all the numbers, x, between m and n (both inclusive) such that the sum of x's factors is a perfect square.
    Return [[x1, perfect-square1], [x2, perfect-square2]]

    eg list_squared(1, 250) ==> [[1, 1], [42, 2500], [246, 84100]] becuase 1 has factors [1] and 1^2 == 1 (perfect square)
    42 has factors [1,2,3,6,7,14,21,42] and the sum of the sqaured factors is 1^2 + 2^2 + 3^2 + 6^2 + 7^2 + 14^2 + 21^2 + 42^2 == 2500 (perfect square)