Aug-25-2019, 07:41 AM
Please explain explicitly how these number are calculated: (12 + 52 + 92 + 132 + ...)
Please explain what is meant with this statement: "return the sum of the squares of those numbers between 1 and N that are separated from each other by four units."
What is meant with "4 units"?
Where did you get this exercise? Do you know the solutions for numbers n == 1,2,3,4,5,6 etc?
----------------------------------
Let´s look at the number 1 to 10 and their squares:
1 1, 2 4, 3 9, 4 16, 5 25, 6 36, 7 49, 8 64, 9 81, 10 100
If n == 1: the sum of the square of 1 is 1.
if n == 2: the sum is 1 + 5 = 6
if n == 3: the sum is 1+5+9 = 15
if n == 4: the sum is 1+5+9+16 = 31
if n == 5: the sum is 1+5+9+16+25 = 56
n == 6: 56+36 = 92
n == 7: 92+49 = 141
n == 8: 141+64 = 205
n == 9: 205+81 = 286
n == 10: 286+100 = 386
I don´t find any of those sums in your numbers, so i don´t understand your exercise or the numbers you provided have nothing to do with that exercise.
Please explain what is meant with this statement: "return the sum of the squares of those numbers between 1 and N that are separated from each other by four units."
What is meant with "4 units"?
Where did you get this exercise? Do you know the solutions for numbers n == 1,2,3,4,5,6 etc?
----------------------------------
Let´s look at the number 1 to 10 and their squares:
1 1, 2 4, 3 9, 4 16, 5 25, 6 36, 7 49, 8 64, 9 81, 10 100
If n == 1: the sum of the square of 1 is 1.
if n == 2: the sum is 1 + 5 = 6
if n == 3: the sum is 1+5+9 = 15
if n == 4: the sum is 1+5+9+16 = 31
if n == 5: the sum is 1+5+9+16+25 = 56
n == 6: 56+36 = 92
n == 7: 92+49 = 141
n == 8: 141+64 = 205
n == 9: 205+81 = 286
n == 10: 286+100 = 386
I don´t find any of those sums in your numbers, so i don´t understand your exercise or the numbers you provided have nothing to do with that exercise.