Sponsored links: Algebra eBooks
 

Related

integer_partitions

integer_partitions (4...

Calculate

integer_partitions

integer_partitions (3);

Calculate

integer_partitions

integer_partitions (9...

Calculate

integer_partitions

integer_partitions (2...

Calculate

integer_partitions

integer_partitions (1...

Calculate

integer_partitions-length

length ( integer_part...

Calculate

integer_partitions

ip: integer_partition...

s: [1,2,3];

Calculate

integer_partitions

integer_partitions (1...

Calculate

integer_partitions

integer_partitions (4...

Calculate

integer_partitions-length

length ( integer_part...

Calculate

integer_partitions

Run Example
(%i1)num_partitions (5) = cardinality (integer_partitions (5));
(%o1)                                7 = 7
(%i2)  num_partitions (8, list);
(%o2)                   [1, 1, 2, 3, 5, 7, 11, 15, 22]
(%i3)  num_partitions (n);
(%o3)                          num_partitions(n)
(%i4) 
Run Example
num_partitions (5) = cardinality (integer_partitions (5));
(%o1)                                7 = 7
(%i2)  num_partitions (8, list);
(%o2)                   [1, 1, 2, 3, 5, 7, 11, 15, 22]
(%i3)  num_partitions (6);
(%o3)                                 11
(%i4) 
Run Example
bellp(n,k,x):=block([partlist,npartlist,y,i],partlist: integer_partitions(n),print(partlist),npartlist: [],for i:1 thru length(partlist) do (y: part(partlist,i),print("y=",y),if length(y)=n-k+1 then (npartllist: append(npartlist,[y]))),print(npartlist));
(%o1) bellp(n, k, x) := block([partlist, npartlist, y, i], 
partlist : integer_partitions(n), print(partlist), npartlist : [], 
for i thru length(partlist) do (y : part(partlist, i), print("y=", y), 
if length(y) = n - k + 1 then npartllist : append(npartlist, [y])), 
print(npartlist))
(%i2) bellp(2,1,x);
{[1, 1], [2]} 
y= [1, 1] 
y= [2] 
[] 
(%o2)                                 []
(%i3) 

Related Help

Help for Integer_partitions