OFFSET
1,1
COMMENTS
Negative primes not permitted. - Harvey P. Dale, Sep 02 2015
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
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 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Jul 21 2010
STATUS
approved