"Integer partitions"의 두 판 사이의 차이

수학노트
둘러보기로 가기 검색하러 가기
(피타고라스님이 이 페이지의 위치를 <a href="/pages/4883819">analytic number theory</a>페이지로 이동하였습니다.)
19번째 줄: 19번째 줄:
 
 
 
 
  
<h5>mathematica code</h5>
+
<h5>partition and rank</h5>
  
 
<< Combinatorica`<br> (*define a integer you want to investigate*)<br> n := 12<br> (* choose the proper moduli for the partition statistics *)<br> md := 7<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[n]<br> PartitionsP[n]<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 p (n), the partition statistics and list of paritions \<br> with rank*)
 
<< Combinatorica`<br> (*define a integer you want to investigate*)<br> n := 12<br> (* choose the proper moduli for the partition statistics *)<br> md := 7<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[n]<br> PartitionsP[n]<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 p (n), the partition statistics and list of paritions \<br> with rank*)
 +
 +
 
 +
 +
 
 +
 +
<h5>pa</h5>

2010년 3월 4일 (목) 21:28 판

background

n:=9

md:=5

 

n:=12

md:=7

 

will be a good choice

 

 

partition and rank

<< Combinatorica`
(*define a integer you want to investigate*)
n := 12
(* choose the proper moduli for the partition statistics *)
md := 7
S[n_] := Partitions[n]
(*define the rank of a partition with the name "pr"*)
pr[s_] := Max[s] - Length[s]
S[n]
PartitionsP[n]
(*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 p (n), the partition statistics and list of paritions \
with rank*)

 

 

pa