a(3)=239 since 239+(2+3+9)+(2^2+3^2+9^2)=239+14+94=347 is prime AND 239-14-94=131 is prime.
MATHEMATICA
sdQ[n_]:=Module[{sd=Total[IntegerDigits[n]]+Total[IntegerDigits[n]^2]}, sd<n&&AllTrue[n+{sd, -sd}, PrimeQ]]; Select[Prime[Range[1300]], sdQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 02 2015 *)