Equivalent and attained version of Hardy's inequality in Rn