Integer partitions

수학노트
http://bomber0.myid.net/ (토론)님의 2010년 3월 5일 (금) 17:57 판
둘러보기로 가기 검색하러 가기
background

n:=9

md:=5

 

n:=12

md:=7

 

 

n:=6

md:=11

 

 

will be a good choice

 

\(p(5k+4)\equiv 0 \pmod 5\)

\(p(7k+5)\equiv 0 \pmod 7\)

\(p(11k+6)\equiv 0 \pmod {11}\)

 

 

partition rank and crank

(*define a integer you want to investigate*)n := 6
(*choose the proper moduli for the partition statistics*)
md := 11
S[n_] := IntegerPartitions[n]
(*define the rank of a partition with the name "pr"*)
pr[s_] := Max[s] - Length[s]
(*define the crank of a partition with the name "crank"*)
Om[s_] := Count[s, 1]
KK[s_] := Select[s, # > Om[s] &]
Mu[s_] := Length[KK[s]]
crank[s_] := If[Om[s] == 0, Max[s], Mu[s] - Om[s]]
(*modulus distribution of partition rank*)
Sort[Tally[Table[Mod[pr[s], md], {s, S[n]}]]]
(*modulus distribution of partition crank*)
Sort[Tally[Table[Mod[crank[s], md], {s, S[n]}]]]
(*list of paritions with rank & crank *)
Do[Print[s, ", rank=", pr[s], "\[Congruent]", Mod[pr[s], md], "(mod ",
   md, ")", ", crank=", crank[s], "\[Congruent]", Mod[crank[s], md],
  "(mod ", md, ")"], {s, S[n]}]
(*you will see the distribution of rank/crank modulus,the partition \
statistics and list of paritions with rank&crank*)

 

 

nu

 

various partitions

(* partitions with at most 5 parts *)
IntegerPartitions[7, 5]


(* partition into exactly three parts *)
VS[n_] := IntegerPartitions[n, {3}]
VS[11]

 


(* number of partitions into distinct parts *)
PartitionsQ[11]

 

(* partition into odd parts *)
IntegerPartitions[11, All, {1, 3, 5, 7, 9, 11}]