read "GeneralizedShepp.txt": #The user may set k to be any probability they desire, though for the sake of #organization powers of 1/2 are recommended. The user may also change the #functional G by altering the upper limit of summation to be any negative #integer -d. When this is done, the user should change the suffix of the #PGFTable output and the file name to match the value of d and the power #of 1/2. We have used 2 and 3 for example here. k:=2^(-3): G:=g->k-(add(coeff(g,x,i),i=ldegree(g)..-2)): #The values of M and P may be set to whatever the user desires. #Be warned that M+P>2000 will likely take a long time to run. M:=700: P:=700: GeneralShepp23:=op(PGFTableGen(M,P,G,x)): save GeneralShepp23, "GeneralData23.m":