(101 × 99) - (102 × 98) + (103 × 97) − (104 × 96) + ... + (149 × 51) − (150 × 50).
(100^2 - 1^2) - (100^2 - 2^2) + (100^2 - 3^2) − (100^2 - 4^2) + ... + (100^2 - 49^2) − (100^2 - 50^2)
(- 1^2) - (- 2^2) + (- 3^2) − (- 4^2) + ... + (- 49^2) − (- 50^2)
- 1^2 + 2^2 - 3^2 + 4^2 + ... - 49^2 + 50^2
Sum of first N squares is f(N) = N(N+1)(2N+1)/6
Sum of all squares up to 50: 42925
Sum of all EVEN squares up to N is 4*f(N/2) = 4*f(25) = 4*5525 = 22100
Sum of all ODD squares up to N 42925 - 22100 = 20825
Our series is sum of all squares up to 50 minus twice the odd squares:
= 42925 - 2*20825 = 1275
Verified by spreadsheet
|
Posted by Larry
on 2024-07-08 10:25:08 |