Printing table of coefficients and partial sums for each example

Mathematica program

(* Printing table of coefficients and partial sums for each example *)

func = coeff[name];
sect = "ctable";
entity = "table";
"<A NAME=\"" <> sect <> "\"></A><TABLE BORDER=1 CELLPADDING=8 CELLSPACING=0 BGCOLOR=\"#FFFFFF\"><TR><TD>" // p;
"<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>" // p;
"<TR><TH ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#FFFFFF\" \
COLSPAN=3>Coefficients of M&#248;ller-Plesset perturbation series" <>
      "</TH></TR>" // p;
"<TR ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#FEF8CB\"><TH \
WIDTH=\"10%\"><I>n</I></TH>" <> 
      "<TH><I>E</I><SUB><I>n</I></SUB></TH><TH>Partial sum</TH></TR>" // p;
esum = 0;
Do[cn = func[[n]];
    esum = esum + cn;
    "<TR ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#FFFFFF\"><TD \
WIDTH=\"10%\">" <>
        ToString[n] <> "</TD><TD ALIGN=\"LEFT\" NOWRAP><TT>" <> print0[cn] <> "</TT></TD><TD ALIGN=\"LEFT\" NOWRAP><TT>" <> 
        print0[esum] <> "</TT></TD></TR>" // p;
    , {n, nm}];
"<TR ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#D5D5EA\"><TD \
COLSPAN=2>Exact energy</TD><TD ALIGN=\"LEFT\"><TT><B>" <> print0[enex] <> "</B></TT></TD></TR>" // p;
"</TABLE></TD></TR></TABLE>" // p;

printprogr[sect]; printnav;

Molecule - icon for Allen-dataBlankExamples of MP seriesBlankSource code of Mathematica programBlankMathematica programsBlankWork in UMass DartmouthWork in UMassDBlankWaste iconUnpublished reports

Designed by A. Sergeev.