In Mathematica, I have a table in which each entry of the table is a curve in 3 dimensions. I want to assign different colors to different curves, but I don't know how to do it. 

My current command is:

```
Plot3D[
      Table[
            Max[Table[SocPlanGen[4,1,1,R,2,p,Min[4/(1+2 k/N),N], N], {k,0,N}]]
                ,{N, 1, 4}
           ]
      , {R,2,20}, {p, 0.1, 1}
      , PlotStyle -> ColorData[1, "ColorList"], PlotLegends -> {"4","3","2","1"}
      ]

```

where SocPlanGen[.] is a function I have defined earlier. 

The outer Table[.] has 4 entries ({N,1,4}). Each entry of the outer Table[.] is a curve defined in the space (R,p), and I want each curve to be of a separate color. But the way I currently have it, all curves are the same color because they belong to the same Table.

I would greatly appreciate any suggestions!