(12C+) Bernoulli Number
|
09-11-2023, 03:48 PM
(This post was last modified: 09-12-2023 05:49 PM by Albert Chan.)
Post: #11
|
|||
|
|||
RE: (12C+) Bernoulli Number
(07-28-2019 12:02 AM)Albert Chan Wrote: 1 64 729 4096 15625 46656 117649 // value of 1^6 to 7^6Note: above Σk^6 formula is from 0 to n = B(7,n)/7 + n^6 We may use symmetry, and do 0^6 to 3^6, then flip it, to get values (-3)^6 .. (+3)^6 This keep table numbers smaller, thus smaller forward difference numbers: \(x^6 = 729\binom{x+3}{0} -665\binom{x+3}{1} +602\binom{x+3}{2} -540\binom{x+3}{3} +480\binom{x+3}{4} -360\binom{x+3}{5} +720\binom{x+3}{6}\) Integrate (actually sum, but look like integration) \(\large \frac{B^7}{7} \normalsize = 729\binom{x+3}{1} -665\binom{x+3}{2} +602\binom{x+3}{3} -540\binom{x+3}{4} +480\binom{x+3}{5} -360\binom{x+3}{6} +720\binom{x+3}{7} \) + C Differentiate, evaluated at x=0, we get B(6) = RHS constant term. First half of terms is not as easy to evaluate, because there was no factor x (with a factor x, derivative at x=0 make the term goes away!) But, it may still worth it, to keep forward difference table entries small. Note: for B(m), n = floor(m/2), k = 1 .. n \(\displaystyle \binom{x+n}{k} = \left(\frac{x+n}{k}\right) \binom{x+n-1}{k-1} \) \(\displaystyle \binom{x+n}{k}' \bigg\rvert_{x=0} = \left(\frac{1}{k}\right) \binom{n-1}{k-1} + \left(\frac{n}{k}\right) \binom{x+n-1}{k-1}'\bigg\rvert_{x=0} \) I had managed to undo recursion, into iterative sums (written prove welcome!) \(\displaystyle \binom{x+n}{k}' \bigg\rvert_{x=0} \;=\; \sum_{j=1}^{k} \frac{(-1)^{j+1}}{j}\; \binom{n}{k-j} \;=\; \binom{n}{k}\;\sum_{j=n-(k-1)}^{n} \frac{1}{j} \) Note that coefficient formula good for half terms (the other half is easy, see code) Code: from gmpy2 import mpq, mpz, xmpz I did not optimize away B(odd m), just to see if it matches ... it does! B(1) = -1/2, B(odd>1) = 0 >>> for m in range(2,31,2): print m, bernoulli(m) ... 2 1/6 4 -1/30 6 1/42 8 -1/30 10 5/66 12 -691/2730 14 7/6 16 -3617/510 18 43867/798 20 -174611/330 22 854513/138 24 -236364091/2730 26 8553103/6 28 -23749461029L/870 30 8615841276005L/14322 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C+) Bernoulli Number - Gamo - 07-27-2019, 06:41 AM
RE: (12C+) Bernoulli Number - Albert Chan - 07-27-2019, 12:41 PM
RE: (12C+) Bernoulli Number - Gamo - 07-27-2019, 01:40 PM
RE: (12C+) Bernoulli Number - John Keith - 07-27-2019, 07:49 PM
RE: (12C+) Bernoulli Number - Albert Chan - 07-28-2019, 12:02 AM
RE: (12C+) Bernoulli Number - John Keith - 07-28-2019, 11:21 AM
RE: (12C+) Bernoulli Number - Albert Chan - 08-30-2023, 09:46 PM
RE: (12C+) Bernoulli Number - Albert Chan - 09-11-2023 03:48 PM
RE: (12C+) Bernoulli Number - Albert Chan - 07-28-2019, 01:08 AM
RE: (12C+) Bernoulli Number - Gamo - 07-28-2019, 02:29 AM
RE: (12C+) Bernoulli Number - Albert Chan - 07-31-2019, 05:14 PM
RE: (12C+) Bernoulli Number - Albert Chan - 09-12-2023, 05:59 PM
|
User(s) browsing this thread: 4 Guest(s)