The "middle name" you're talking about is patronime?
If so, the male form is usually produced from the name of the father by adding suffix -(v)ich; the female - by adding (v)na.