In a sequence of length n, where n=2k+3, that is there are k unique numbers appeared twice and three numbers appeared only once.
The question is: how to fin
If a probabilistic solution will suffice then you could use a Bloom Filter.
Create two Bloom filters. The first (A) contains numbers that have been found at least one, and the second (B) contains numbers that have been found twice.
Pseudocode:
A = empty
B = empty
foreach x in the list
if x in A
add x to B
else
add x to A
foreach x in the list
if x in A
if !(x in B)
print x
If you use the full 1000KB then the probability of error would be ridiculously low.