This is my first time using mathematica so I'm pretty confused. This question is based on the Sierpinski Triangle.
The figure below shows the percentage of total even entries and total odd entries through columns 10,20,30...1000
To generate that figure of the sideways parabola, I have this code:
ListPlot[
{
Table[
{
col,
100. Total[
Flatten[
Table[
If[
EvenQ[Binomial[n, k]],
1,
0
],
{n, 0, col, 1},
{k, 0, n, 1}
],
1
]
]/((col + 1) (col + 2)/2)
},
{col, 10, 1000, 5}
],
Table[
{
col,
100. Total[
Flatten[
Table[
If[
OddQ[Binomial[n, k]],
1,
0
],
{n, 0, col, 1},
{k, 0, n, 1}
],
1
]
]/((col + 1) (col + 2)/2)
},
{col, 10, 1000, 5}
]
},
Filling -> Axis,
PlotStyle -> {Blue, Orange},
ImageSize -> Automatic
]
How can I generate the figure that shows the time it took to compute the even percentages through columns 10,...,500 and also show the parabola that best fits teh time data?
Also once I have that best-fit quadratic, how can I predict the time it would take to generate 1000 column?