I am trying to understand the effect of the critical Nyquist frequency when applying the Goertzel algorithm for estimating the power spectrum of a discrete signal. (Goertzel doesn't really matter, FFT applies as well). Assume that I generate $N=512$ discrete values of the sine wave $x[n]$, where $n=1,2,\ldots,N$ using the function
$$x[n]=\sin(30 \cdot 2\pi n/N) + \sin(60 \cdot 2\pi n/N) + \sin(120 \cdot 2\pi n/N) \\ + \sin(260 \cdot 2\pi n/N) + \sin(330 \cdot 2\pi n/N)$$
After applying the Goertzel algorithm, there will be 512 power spectrum values at $k=1,2,\ldots,512$. Looking at the results, it appears that in the upper half of the scale ($257 \leq k \leq 512$), the real (vs. imag) power spikes for frequencies 1/260 and 1/333 are negative. In addition, in the lower half of the range ($1 \leq k \leq 256$), the power value for $k=60$ is zero, and there are false positive spikes at spurious frequency values. However, if I double the length of the generated signal to 1024, and only apply the Goertzel algorithm to $k=1,2,\ldots,512$, all of the power spectrum values at $k=30, 60, 120, 260$, and $330$ are positive and there are no false positive values below 512 and the value at k=60 is non-zero and positive. My understanding of the Nyquist requirement is that the power value at $k=1$ is unreliable.
So what I believe I have observed is that if you want to use the real (vs imag) power spectrum values at frequencies between 1/2 and 1/512, you need to provide a signal with twice (1024) the number of samples. Another way of saying this is that if you have a discrete signal with 1024 samples, you can only determine the power spectrum at frequencies greater than 1/512, i.e., 1/511,1/510,...,1/2.
Is there a law or equation that states that the sample size $N$ needs to be at least twice as long as the longest wavelength to be assessed? Or, is this really the meaning of Nyquist, i.e. $2N$.