Re: Pretty output
- To: mathgroup at smc.vnet.net
- Subject: [mg35157] Re: [mg35149] Pretty output
- From: BobHanlon at aol.com
- Date: Thu, 27 Jun 2002 00:23:22 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 6/26/02 1:37:12 AM, rgwv at kspaint.com writes: >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? Your Print output is wider than your window and is being wrapped. Use the following: s[n_] := Evaluate[Sum[x^i,{i,0,2^n}]]; (t=Table[Factor[s[n],Modulus->2],{n,10}])//ColumnForm If[Head[#]===Times,Length[#],1]& /@ t Bob Hanlon Chantilly, VA USA