(準備中)
(仮称)十進BASICでは簡単にベルヌーイ数が計算できる |
REM Bernoulli数 OPTION ARITHMETIC rational INPUT PROMPT "n=": n DIM b(0 TO n) LET b(0)=1 FOR k=2 TO n+1 LET s = 0 FOR i=0 TO k-2 LET s = s + comb(k,i)*b(i) NEXT i LET b(k-1) = - s / k PRINT "B_{";k-1;"}=";b(k-1) NEXT k END |