Partition Function P Congruences

Author

Eric W. Weisstein
September 4, 2003

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Combinatorics/PartitionFunctionPCongruences.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PartitionFunctionPCongruences.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Ramanujan's Identities

<<QSeries`

P (5 m+4)

Series[5 QSeries[q^5]^5/QSeries[q]^6,{q,0,10}]

CoefficientList[%,q]

Table[PartitionsP[5m+4],{m,0,10}]

P(7 m+5)

Series[7 QSeries[q^7]^3/QSeries[q]^4+49q QSeries[q^7]^7/QSeries[q]^8,{q,0,10}]

CoefficientList[%,q]

Table[PartitionsP[7m+5],{m,0,10}]

Parity

Select[Table[PartitionsP[n],{n,100}],OddQ]

Select[Table[PartitionsP[n],{n,100}],EvenQ]

Plot

v5.0

p=Table[Mod[PartitionsP[n],2],{n,2000}];//Timing

p=Table[Mod[PartitionsP[n],2],{n,5000}];//Timing

<<Graphics`Colors`

MakeBoxes[label,TraditionalForm]:=RowBox[{RowBox[{"\[LeftBracketingBar]",RowBox[{"{",RowBox[{RowBox[{"P","(","k",")"}]," ",RowBox[{"odd",":",RowBox[{"1","≤","k","≤","n"}]}]}],"}"}],"\[RightBracketingBar]"}],"/","n"}]

ListPlot[MapIndexed[#1/First[#2]&,Rest[FoldList[Plus,0,p]]],
AxesLabel->TraditionalForm/@{n,label},
PlotJoined->True,PlotStyle->Red]