a(4)=0 because the fourth perfect square 16 is the difference between two primes: 19-3. a(5)=25 figures here because the nearest prime greater than 25 is 29 and the difference 29-25 is 4 (an even number >2), thus not a prime; all other greater primes are odd and the difference with 25 will give an even number, thus again not a prime.