It is known that characters of BPS representations of extended superconformal
algebras do not have good modular properties due to extra singular vectors
coming from the BPS condition. In order to improve their modular properties we
apply the method of Zwegers which has recently been developed to analyze
modular properties of mock theta functions. We consider the case of N=4
superconformal algebra at general levels and obtain the decomposition of
characters of BPS representations into a sum of simple Jacobi forms and an
infinite series of non-BPS representations.
We apply our method to study elliptic genera of hyper-Kahler manifolds in
higher dimensions. In particular we determine the elliptic genera in the case
of complex 4 dimensions of the Hilbert scheme of points on K3 surfaces K^{[2]}
and complex tori A^{[[3]]}.Comment: 28 page