I quickly tested this update which generates multiples of the ~ 46.83 Hz signal. Also, I think the original was wrong (it skipped the last LUT value) when it used

if (lutndx == (LUT_SIZE-1))...