You must then use a loop (for or while) to find the sum of all the numbers in the geometric sequence of 3 less than N.

The geometric sequence of 3 looks like this

1, 3, 9, 27, 81, 243, ... where you start with the number one and multiply the previous number by 3 to get the next number.

add the sequences together to get answer