"Integer partitions"의 두 판 사이의 차이
둘러보기로 가기
검색하러 가기
1번째 줄: | 1번째 줄: | ||
− | + | n := 9<br> (* choose the proper moduli for the partition statistics *)<br> md := 5<br> S[n_] := Partitions[n]<br> (*define the rank of a partition with the name "pr"*)<br> pr[s_] := Max[s] - Length[s]<br> S[9]<br> (*partition statistics*)<br> Table[Mod[pr[s], md], {s, S[n]}]<br> Sort[%]<br> (*list of paritions with rank*)<br> Do[Print[s, ", rank=", pr[s], "\[Congruent]",<br> Mod[Max[s] - Length[s], md], "(mod ", md, ")"], {s, S[n]}]<br> (*you will see the partition statistics and list of paritions with \<br> rank*) |
2009년 12월 25일 (금) 08:00 판
n := 9
(* choose the proper moduli for the partition statistics *)
md := 5
S[n_] := Partitions[n]
(*define the rank of a partition with the name "pr"*)
pr[s_] := Max[s] - Length[s]
S[9]
(*partition statistics*)
Table[Mod[pr[s], md], {s, S[n]}]
Sort[%]
(*list of paritions with rank*)
Do[Print[s, ", rank=", pr[s], "\[Congruent]",
Mod[Max[s] - Length[s], md], "(mod ", md, ")"], {s, S[n]}]
(*you will see the partition statistics and list of paritions with \
rank*)