Re: Pretty output

*To*: mathgroup at smc.vnet.net*Subject*: [mg35172] Re: Pretty output*From*: Peter Pein <petsie at arcor.de>*Date*: Fri, 28 Jun 2002 02:31:01 -0400 (EDT)*Organization*: Arcor*References*: <afbih4$54r$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Robert G. Wilson v wrote: > Help please. > > I put in the following Mathematica code: Do[s = Sum[x^i, {i, 0, 2^n}]; > Print[ ToString[ Factor[ s, Modulus -> 2]]], {n, 1, 10}] > > The output was fairly straight forward until n=6 and beyond. What I am > seeing is: > > " 2 3 4 4 5 6 7 8 12 2 > 5 6 7 10 12 2 3 4 6 8 9 \ > 10 12 3 5 6 7 9 11 12 2 > 3 4 5 6 7 8 9 10 11 12\n(1 + x \ > + x + x + x ) (1 + x + x + x + x + x + x ) (1 + x + x + x + > x + x + x ) (1 + x + x + x + x + x + x + x + x \ > ) (1 + x + x + x + x + x + x + x + x ) (1 + x + x + x + x + > x + x + x + x + x + x + x + x )" > > What is the deal here? > > Also what is the easiest way to count the number of factors? > > Thank you for any assistance in advance. > > Sincerely yours, > > Robert G. Wilson, V > Hi Robert, if you have to use ToString (#%&$'%§$!!), then try: Do[s = Sum[x^i, {i, 0, 2^n}]; Print[ToString[Factor[s, Modulus -> 2], PageWidth -> 80]], {n, 1, 10}] or a PageWidth suitable for your needs. Peter