I have this question on Sierpinski's triangle:

What percentage of the figure is blue?

```
Graphic[
Table[
If[
EvenQ[Binomial[col, k]],
{EdgeForm @ Thin, Blue, Rectangle[{col, k}]}
{EdgeForm @ Thin, Yellow, Rectangle[{col, k}]}
],
{col, 0, 7, 1},
{k, 0, col, 1}
]]
```

create a collection of six characters, each character representing a new stage of the Sierpinski triangle. Combination table[] with the previous batch of code:

```
Table[
Graphics[
Table[
If[
EvenQ[Binomial[col, k]],
{Blue, rectangle[{col, k}]}
{Yellow, rectangle[{col, k}]}
],
{col, 0, n, 1},
{k, 0, col, 1}
]],
{n, {7, 15, 31, 63, 127, 255}}
]
```

more elegantly:

```
Table[
Graphics[
Table[
If[
EvenQ[Binomial[col, k]],
{Blue, rectangle[{col, k}]}
{Yellow, rectangle[{col, k}]}
],
{col, 0, 2 ^ n - 1, 1}, (* This ensures that we have a
of-2 number of columns. *)
{k, 0, col, 1}
]],
{n, 3, 8, 1}
]
```

Think of some counting operations:

```
Table[
If[
EvenQ[Binomial[col, k]],
1
0
],
{col, 0, 7, 1},
{k, 0, col, 1}
]
```

count[] the 1 in the previous list, start with Flatten[]in the list:

```
Flatten[
Table[
If[
EvenQ[Binomial[col, k]],
1
0
],
{col, 0, 7, 1},
{k, 0, col, 1}
]]count[
Flatten[
Table[
If[
EvenQ[Binomial[col, k]],
1
0
],
{col, 0, 7, 1},
{k, 0, col, 1}
]],
1
]
```

To find the percentage of evens, divide that number by the length[] from the same list:

```
100. Count[
Flatten[
Table[
If[
EvenQ[Binomial[col, k]],
1
0
],
{col, 0, 2 ^ 9 - 1, 1}, (*
Change the polynomial *)
{k, 0, col, 1}
]],
1
]/Length[
Flatten[
Table[
If[
EvenQ[Binomial[col, k]],
1
0
],
{col, 0, 2 ^ 9 - 1, 1},
{k, 0, col, 1}
]]]
```

What changes do I need to make to give the percentage of entries that are even?

How can I generate a table where the left column shows the number of columns in the triangle while the right column gives the percentage of entries identical to those in the image?

I am very new at Mathematica, so I spend a lot of time on it.