Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Bell-numbers/Mathematica/bell-numbers-1.math
Normal file
2
Task/Bell-numbers/Mathematica/bell-numbers-1.math
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
BellTriangle[n_Integer?Positive] := NestList[Accumulate[# /. {a___, b_} :> {b, a, b}] &, {1}, n - 1];
|
||||
BellNumber[n_Integer] := BellTriangle[n][[n, 1]];
|
||||
14
Task/Bell-numbers/Mathematica/bell-numbers-2.math
Normal file
14
Task/Bell-numbers/Mathematica/bell-numbers-2.math
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
In[51]:= Array[BellNumber, 25]
|
||||
|
||||
Out[51]= {1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147, 115975, 678570, \
|
||||
4213597, 27644437, 190899322, 1382958545, 10480142147, 82864869804, \
|
||||
682076806159, 5832742205057, 51724158235372, 474869816156751, \
|
||||
4506715738447323, 44152005855084346, 445958869294805289}
|
||||
|
||||
In[52]:= BellTriangle[10]
|
||||
|
||||
Out[52]= {{1}, {1, 2}, {2, 3, 5}, {5, 7, 10, 15}, {15, 20, 27, 37,
|
||||
52}, {52, 67, 87, 114, 151, 203}, {203, 255, 322, 409, 523, 674,
|
||||
877}, {877, 1080, 1335, 1657, 2066, 2589, 3263, 4140}, {4140, 5017,
|
||||
6097, 7432, 9089, 11155, 13744, 17007, 21147}, {21147, 25287, 30304,
|
||||
36401, 43833, 52922, 64077, 77821, 94828, 115975}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue