Helical distortion of the core part of tokamak plasma, which is called a helical core or a long-lived mode, is investigated by means of three-dimensional magnetohydrodynamic equilibrium calculations. It is found that the magnitude of the helical distortion strongly depends on the shape of the plasma boundary for weakly reversed shear plasmas. The triangularity of the boundary enhances the amplitude of helical distortion. In addition, reversed D-shape plasmas also exhibit a helical core. It is also found that the triangularity lowers the critical b for the onset of a helical core; furthermore, the critical b vanishes when the triangularity exceeds a certain value. On the other hand, the influence of the ellipticity on the amplitude of helical distortion strongly depends on b. The ellipticity enhances the amplitude at high b, while it reduces the amplitude at low b.