How to calculate


The following program calculates Bernoulli numbers.
Further informations are here.



10   ' Bernoulli
20   N=20:dim B(N):B(0)=1
30   for I=1 to N:S=0
40     for J=0 to I-1
50       S=S+B(J)//!(J)//!(I+1-J)
60     next J
70     B(I)=S*(-1)*!(I)
80     print I,B(I)
90   next I

index


E-mail : kc2h-msm@asahi-net.or.jp
Hisanori Mishima