I have to find the relationship between these sequences, and express a generality. Could you help please.

1 + 3 + 5 + 3 + 1 = 3^2 + 2^2
1 + 3 + 5 + 7 + 9 + 7 + 5+ 3 + 1 = 5^2 + 4^2
1 + 3 + 1 = 2^2 + 1^2

I'm thinking sum of consecutive primes can be expressed in squares? The numbers add up. What's the generality?

Thanks

First of all, did you know that the sum of the first n odd numbers is n^2 ?

e.g.
1+3+5+7+9+11 = 6^2 = 36

So when you look at your sequences, they are actually made up of the addition of the sum of n odd number plus the addition of (n-1) odd numbers

notice your second is actually
(1+3+5+7+9) + (1+3+5+7) = 5^2 + 4^2

If you know how to express sigma notation you could do
sigma(2i-1) from i=1 to n + sigma(2i-1) from 1 to n-1 = n^2 - (n-1)^2

last line should have said :

sigma(2i-1) from i=1 to n + sigma(2i-1) from 1 to n-1 = n^2 + (n-1)^2

Thanks Reiny,

Yes, I spotted that it dosen't work for any run of primes, but it does up to 9. I'm afraid i don't really follow your explanation!

An answer for dummies maybe?

Charlie

ok, look at this patters

sum of 1 odd number = 1 = 1^2
sum of 2 odd numbers = 1+3 = 4 = 2^2
sum of 3 odd numbers = 1+3+5 = 9 = 3^2
sum of 4 odd numbers = 1+3+5+7 = 16 = 4^2
...
sum of n odd numbers = 1+3+...+ (2n-1) = n^2
( 2n-1) is the general expression for an odd number.

this has nothing to do with primes.
Why do you say it works only up to 9, it works for the sum of odd numbers up to any value you want.
e.g.
1+3+5+7+9+11+13+15+17+19 = 10^2 = 100.
They were the first 10 odd numbers.

now look again at your second example of
1+3+5+7+9+7+5+3+1
=1+3+5+7+9 + (1+3+5+7)
= sum of first 5 odd numbers + sum of the first 4 odd numbers
= 5^2 + 4^2

To find the relationship and express a generality between these sequences, let's analyze them step by step.

The first sequence is:
1 + 3 + 5 + 3 + 1

The second sequence is:
1 + 3 + 5 + 7 + 9 + 7 + 5 + 3 + 1

The third sequence is:
1 + 3 + 1

By looking at the first sequence, we can observe that it is symmetrical. It starts with 1, then increases by 2 each time until it reaches the middle term (in this case, 5). After reaching the middle term, it starts decreasing by 2 until it reaches the last term (1). This symmetrical pattern suggests that it might be related to squares.

Now, let's analyze the sums of the sequences:

In the first sequence, the sum is 1 + 3 + 5 + 3 + 1 = 13

In the second sequence, the sum is 1 + 3 + 5 + 7 + 9 + 7 + 5 + 3 + 1 = 41

In the third sequence, the sum is 1 + 3 + 1 = 5

If we look at the sums, we can notice that the sum of the first sequence (13) is equal to 3^2 + 2^2, the sum of the second sequence (41) is equal to 5^2 + 4^2, and the sum of the third sequence (5) is equal to 2^2 + 1^2.

Based on this observation, it appears that the sum of the terms in each sequence can be expressed as the sum of squares. Specifically, the sum is equal to n^2 + (n-1)^2, where n is the number of terms in the sequence.

So, the generality of the relationship between these sequences is that the sum of consecutive terms follows the pattern of n^2 + (n-1)^2, where n represents the number of terms in the sequence.

In other words, for any sequence with n terms following the symmetrical pattern, the sum of the terms can be expressed as n^2 + (n-1)^2.