(* Display of coefficient of perturbation series *) minorder = 3; ifdisplay=False; ( Do[ If[!NumberQ[energy[n]], Break[]]; nm = n, {n, 0, morder}]; If[nm --- finished ---"]; Goto[enddisplay] ]; (* Plotting energy[n] *) (* nm = morder; *) enplus = enminus = enall = {}; Do[ener = energy[n]; If[ener != 0, nener = {n, Log[10., Abs[ener]]}; enall = Append[enall, nener]]; If[ener > 0, enplus = Append[enplus, nener]]; If[ener < 0, enminus = Append[enminus, nener]], {n, 0, nm}]; rat = 1/GoldenRatio // N; pntsz = 0.016 (30/(15 + nm))^(1/3); plt00 = ListPlot[{{0, 0}}, PlotStyle -> {PointSize[0]}, DisplayFunction -> Identity]; pltplus = If[Length[enplus] == 0, {}, ListPlot[enplus, PlotStyle -> {RGBColor[1, 0, 0], PointSize[pntsz]}, DisplayFunction -> Identity]]; pltminus = If[Length[enminus] == 0, {}, ListPlot[enminus, PlotStyle -> {RGBColor[0, 0, 1], PointSize[pntsz]}, DisplayFunction -> Identity]]; pltall = ListPlot[enall, PlotStyle -> {Thickness[pntsz/4], RGBColor[0.5, 0.5, 0.5]}, PlotJoined -> True, DisplayFunction -> Identity]; xlab = "\!\(\* StyleBox[\"N\",\nFontFamily->\"Times\",\nFontSlant->\"Italic\"]\)"; ylab = "lg|\!\(\* StyleBox[\(E\_N\),\nFontFamily->\"Times\",\nFontSlant->\"Italic\"]\)|"; fsize = 20; plt = Show[pltall, plt00, pltplus, pltminus, AxesLabel -> {Style[xlab, fsize], Style[ylab, fsize]}, AspectRatio -> rat, PlotRange -> {{0, nm + 0.3}, All}, AxesOrigin -> {0, 0}, LabelStyle -> {18}, DisplayFunction -> Identity]; outfile = program<>".gif"; SetDirectory[ToFileName[{"..","..","system","temp"}]]; Export[outfile,plt,"GIF", ImageSize -> {666, 412}]; ResetDirectory[]; (************) nrund=ToString[Floor[10^8 Random[]]]; Print["

"]; Print["
httpHost <> "/system/temp/"<>outfile<>"?" <> nrund <> "\" WIDTH=666 HEIGHT=412 ALT=\"Plot of the expansion coefficients\">
Coefficients of the energy expansion as a function of N, order of the perturbation theory.
Red/blue dots correspond to positive/negative coefficients.

"]; ifdisplay=True; Label[enddisplay]; )