Post Reply 
"Counting in their heads" - 1895 oil painting
08-12-2020, 01:50 PM (This post was last modified: 08-15-2020 07:26 PM by Albert Chan.)
Post: #21
RE: "Counting in their heads" - 1895 oil painting
There is also a pattern for sp (see Benoulli Number thread)

\(s_p(n) = \sum_{x=0}^{n-1}x^p = \large {n^{p+1}\over p+1} - {n^p \over 2}
+ {p\over12}(n^{p-1}) + k_{p-3}(n^{p-3}) + k_{p-5}(n^{p-5}) + \cdots \)

sp(1) = sp(0) + 0^p = sp(0) = 0

⇒ above formula does not have a constant term
⇒ when p is odd, p>1, sp(n) has factor n²

Redo previous example:

s5(n) = n^6/6 - n^5/2 + 5/12*n^4 + k2*n^2
s5(1) = 1/6 - 1/2 + 5/12 + k2 = 0

→ k2 = -1/12
→ s5(n) = (2*n^6 - 6*n^5 + 5*n^4 - n^2) / 12

T = 50^5 + 51^5 + 52^5 + ... + 150^5
   = s5(151) - s5(50)
   = 1936617185625 - 2450520625
   = 1934166665000

Update: we may use this to help mental calculation: For n ≥ 0, sp(n) = (-1)p+1 * sp(1-n)

Redo above example, using s5(151) = s5(-150), and horner's rule
Code:
b = -150
a = 50
d = b-a = -200
d2 = (b^2-a^2)/d = b+a      = -100 
d3 = (b^3-a^3)/d = d2*b+a^2 =  17500
d4 = (b^4-a^4)/d = d3*b+a^3 = -2500000
d5 = (b^5-a^5)/d = d4*b+a^4 =  381250000
d6 = (b^6-a^6)/d = d5*b+a^5 = -56875000000

T = s5(b) - s5(a) = (2*d6 - 6*d5 + 5*d4 - d2)*d / 12 = 1934166665000

Update: we are better off using Euler-Maclaurin formula, which work for any f(x)
Note: coefficients were B(1)/1! = -1/2, B(2)/2! = 1/12, B(4)/4! = -1/720, ...

Σf = Δ-1 f = (eD-1)-1 f = (D-1 - 1/2 + D/12 - D³/720 + ...) f

Example, with f = x^5

s5 = ∫f dx - f/2 + f'/12 - f'''/720 + ... = x^6/6 - x^5/2 + (5x^4)/12 - (60x^2)/720
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-12-2020 01:50 PM



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