Post Reply 
"Counting in their heads" - 1895 oil painting
08-10-2020, 03:06 PM
Post: #10
RE: "Counting in their heads" - 1895 oil painting
(08-09-2020 08:11 PM)Gerson W. Barbosa Wrote:  This should work also for sequences with even number of elements. For instance,

5² + 6² + 7² + 8² = 4[6.5² + (4² - 1)/12] = 174

A bit more difficult to do it in one’s head, though.

"Central element" can be any number, even irrationals.

\(s(x) = (x+a)^2 = a^2 + 2ax + x^2 = a^2 + (2a+1)\binom{x}{1} + 2\binom{x}{2}\)

For sum of n consecutive squares, starting from a^2:

XCas> S(a,n) := [a^2, 2*a+1, 2] * [n, n*(n-1)/2, n*(n-1)*(n-2)/6]
XCas> expand(S(a,n))                         → n^3/3+a*n^2+a^2*n-n^2/2-a*n+n/6

S(a,n) = S(0,a+n-0) - S(0,a). What happens if we replace 0 by c ?

XCas> expand(S(c,a+n-c) - S(c,a-c))    → n^3/3+a*n^2+a^2*n-n^2/2-a*n+n/6

c got *eliminated*, giving same expression as S(a,n) Smile
For exact center, c = a+(n-1)/2, we got a nice compact formula

XCas> simplify(S(c-(n-1)/2, n))            → (12*c^2*n+n^3-n)/12

---

Since we can pick any c, lets try summing T = 88² + 89² + ... + 115², with c=100

[c^2, 2*c+1, 2] = [10000, 201, 2]

\([\binom{16}{1}, \binom{16}{2}, \binom{16}{3}] - [\binom{-12}{1}, \binom{-12}{2}, \binom{-12}{3}]\) = [16,120,560] - [-12,78,-364] = [28,42,924]

T = [10000, 201, 2] • [28,42,924] = 280000 + 8442 + 1848 = 290290

Confirm above with exact center: c = (88+115)/2 = 203/2, n = 115-88+1 = 28

T = c²n + (n+1)(n)(n-1)/12
   = (203/2)²*28 + 29*28*27/12
   = 203²*7 + 29*7*9
   = (41209 + 261)*7
   = 290290
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: "Counting in their heads" - 1895 oil painting - Albert Chan - 08-10-2020 03:06 PM



User(s) browsing this thread: 1 Guest(s)