write n-power test