Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6157

Re: Bernoulli Numbers

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Bernoulli Numbers
Date 2011-11-03 08:59 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j8tl4u$f3o$1@smc.vnet.net> (permalink)
References <201111021122.GAA03586@smc.vnet.net>

Show all headers | View raw


Clear[b];

b[0] = 1;

b[n_Integer?Positive] := b[n] = (x /. Solve[
      Sum[Binomial[n + 1, k]*b[k], {k, 0, n - 1}] + (n + 1)*x == 0,
      x][[1]])

And @@ Table[b[n] == BernoulliB[n], {n, 0, 20}]

True

Sum[Binomial[21, k]*b[k], {k, 0, 20}] == 0

True

Table[{n, b[n]}, {n, 0, 20}] // Grid


Bob Hanlon


On Wed, Nov 2, 2011 at 7:22 AM, David Turner <DTurner@faulkner.edu> wrote:
> Hello,
>
> I wish to compute several Bernoulli numbers, say B0 through B20.  The Bernoulli numbers are defined recursively by
>
> B0 = 1, and Solve[Sum[Binomial[n,k]*Bk,{k,0,n-1}]==0,Bn-1] for n > 1
>
> I am trying to compute these numbers in some type of loop, and display them in a table.  Any help is greatly appreciated.
>
> Thanks,
>
> David

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Bernoulli Numbers Bob Hanlon <hanlonr357@gmail.com> - 2011-11-03 08:59 +0000

csiph-web