Jump to content

Bell numbers: Difference between revisions

add PariGP code (from OEIS)
(Add CLU)
(add PariGP code (from OEIS))
Line 2,265:
4140 5017 6097 7432 9089 11155 13744 17007 21147
21147 25287 30304 36401 43833 52922 64077 77821 94828 115975</pre>
=={{header|PariGP}}==
From the code at OEIS A000110,
<lang>
genit(maxx=50)={bell=List();
for(n=0,maxx,q=sum(k=0,n,stirling(n,k,2));
listput(bell,q));bell}
END</lang>
'''Output:'''
<nowiki>List([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, 4638590332229999353, 49631246523618756274, 545717047936059989389, 6160539404599934652455, 71339801938860275191172, 846749014511809332450147, 10293358946226376485095653, 128064670049908713818925644, 1629595892846007606764728147, 21195039388640360462388656799, 281600203019560266563340426570, 3819714729894818339975525681317, 52868366208550447901945575624941, 746289892095625330523099540639146, 10738823330774692832768857986425209, 157450588391204931289324344702531067, 2351152507740617628200694077243788988, 35742549198872617291353508656626642567, 552950118797165484321714693280737767385, 8701963427387055089023600531855797148876, 139258505266263669602347053993654079693415, 2265418219334494002928484444705392276158355, 37450059502461511196505342096431510120174682, 628919796303118415420210454071849537746015761, 10726137154573358400342215518590002633917247281, 185724268771078270438257767181908917499221852770])</nowiki>
=={{header|Pascal}}==
{{Works with|Free Pascal}}
23

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.