BeginPackage["cefactor`",{"nuccoord`","inputdat`"}] cefactor::usage:= "The cefactor[a,z] evaluates the Coulomb energy factor, which is defined as 1 for two adjacent protons. To evaluate the factor type in as the first argument a - the mass number, and as the second argument z - the atomic number." Begin["`private`"] cefactor[a_Integer,z_Integer]:= (inputdat[a,z];pc=p[a,z,s,e];SequenceForm[f[z]," ",es,in]) f[1]=0 f[k_]:=N[f[k-1]+ Sqrt[8]*Sum[1/Sqrt[(pc[[i]]-pc[[k]]).(pc[[i]]-pc[[k]])],{i,k-1}]] End[] EndPackage[]