Optimal Lp Hardy-type inequalities