Ad
  • Custom User Avatar

    The question is looking for the next number that matches.

    81 is the first number, that meets the requirements therefore it is n=1.
    512 is the next one n=2 (more details are in the instructions for 81 and 512)

    The third one (n=3) is 2401, whose sum is 7 and 7^4 = 2401

    The fourth one (n=4) is 4913, whose sum is 17 and 17^3 = 4913

    I hope this helps clarify what the question is looking for!

  • Custom User Avatar

    Thank you! I got myself all turned around and that helped so much!

  • Custom User Avatar

    Doing this in JavaScript - works for the first perfect powers (29 of 29 Assertions)

    However, the first set of tests - should work for some examples, something seems amiss

    when I console.log what I am trying to return: 4 = 2^2

    The error I am recieving:
    4 = 2^2 - Expected: '[2, 2]', instead got: ''4 = 2^2''

    I have tried plain string concatenation, swapping single and double quotes. I have also tried string interpolation. All come back the same way. None of the first set of examples works, random perfect powers section works sometimes.

    Any advice would be greatly appreciated!