Hello every one, I was making a challenge which I would return the sequence of sums of powers of a number passed to the function, and mention whether it is a winning or not.that is the winning has 1 in the sequence, and nonwinnig has 4 in the sequence. the I decided the following way and my codes are not running the any thing.

When I use the inner loop is is right I get the sum of the squares of the number, by thinking how to make the continuous sequence to get every sum on each level the outer loo gives me nothing. is there some body to give me a hand.

Thank you