From linear to exponential PWM output

Ok. I've read everybody. MarkT has equation right. No need for variable exponent though.
Try this first to verify the math is what you want. It is exponential gamma correction with "gamma" being the exponent.
Then you can change gamma to, say 0.5 or 0.75.
When you have the curve you want use real input for x instead of the loop index.

float gamma = 1.5;
for (x=0; x<256; x++)
{
float normx = x / 255.0;
float normy = pow (normx, gamma);
int y = (int) (0.5 + normy * 255);

serial.print("x: ");
serial.print(x, DEC);
serial.print(" y: ");
serial.println(y, DEC);
}