a(2)=29 because this is the first prime in a run of 2 where p+4 is semiprime (3*11).

PROG

UBASIC: 10 'p+4 is biprime 20 N=1 30 A=3:S=sqrt(N) 40 B=N\A: if B*A=N then N=N+2:goto 30 50 A=A+2: if A<=S then 40 60 C=C+1:O=N+4:D=prmdiv(O):E=O\D 70 if E<>prmdiv(E) or E=1 then C=0:goto 90 80 print C; N; D; E; O: if C>=10 then stop 90 N=N+2:goto 30