How to put sequence in a 3 column row?

Hi everyone. I have a sequence of numbers, let’s say :

data = FixedPoint[IntegerDigits /* Total, #] & /@ 
  Table[Fibonacci[n], {n, 32}]

(*{1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6,2,8,1,9,1,1,2,3,5,8,4,3}*)

and I want to put them in a 3 column raw ( or may be 4,5 ).

How can I do so ?

Maybe like this:

data = FixedPoint[IntegerDigits /* Total, #] & /@ 
  Table[Fibonacci[n], {n, 32}]
Partition[data, 3] // TableForm

Oh, yeah! Cool. May be do you know how to color this numbers based on it valu 1-4-7 - in red, 2-5-8 in green and 3-6-9 in blue?

… and I want to put them in a 3 column raw ( or may be 4,5 )

Sergey, you should rather put them in a 24-column table (I find this surprising!):

data = FixedPoint[IntegerDigits /* Total, #] & /@ Table[Fibonacci[n], {n, 240}];
Partition[data, Length[FindRepeat[data]]] // TableForm

May be do you know how to color this numbers based on it valu 1-4-7 -
in red, 2-5-8 in green and 3-6-9 in blue ?

Did you fix the syntax errors in your previous attempt to do this? If so, please post the code.

Nope! I said you it is not easy to me to open the Mathematica and write something there and you suggest me to correct mistakes in something I am afraid of ! ! !

data = FixedPoint[IntegerDigits /* Total, #] & /@ 
  Table[Fibonacci[n], {n, 32}]
(*{1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6,2,8,1,9,1,1,2,3,5,8,4,3}*)

Which[MemberQ[{1, 4, 7}[#, Red], # <= 
   MemberQ[{2, 5, 8}[#, Green], # <= MemberQ[{3, 6, 9}[#, Blue]] & /@ 
     data

I see red and green errors that Mathematica tells me to fix, but I don’t know what to replace it with …

You can use pattern replacement to color the numbers:

data = FixedPoint[IntegerDigits /* Total, #] & /@ 
   Table[Fibonacci[n], {n, 32}] /. {r : (1 | 4 | 7) :> Style[r, Red], 
   g : (2 | 5 | 8) :> Style[g, Green]}
Partition[data, 3] // TableForm

@Sergey Scorin please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. If you do not format code, it may become corrupted and useless to other members. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

You can also embed notebook or attach notebook.

Thank you. It is working for me. But why when i am trying to add blue color the same way
{r : (1 | 4 | 7) :> Style[r, Red],
g : (2 | 5 | 8) :> Style[g, Green]},
b : (2 | 5 | 8) :> Style[b, Blue]} - it is not working!

Could you please correct me.

You are giving both green and blue to 2,5,8, and the earliest that applies is used. Give Blue to 3-6-9.

Still no luck

data = FixedPoint[IntegerDigits /* Total, #] & /@ 
    Table[Fibonacci[n], {n, 99}] /. {r : (1 | 4 | 7) :> Style[r, Red],
     g : (2 | 5 | 8) :> Style[g, Green]}, 
 b : (3 | 6 | 9) :> Style[b, Blue]}
Partition[data, 3] // TableForm

what’s wrong ?

Your curly braces do not match.

Oh, thanks.

Could you please eplain me how to do the same process but only with grid of numbers
like this :

23 18 25

24 22 20

19 26 21

What “same process”?

I mean how to crash this numbers to one and color them accordingly ?