Spectral analysis of the geomagnetic activity index Ap during different IMF conditions (1947-1978)