|
|
A179631
|
|
Primes p such that p plus or minus the (sum of its digits and sum of squares of its digits) is a prime.
|
|
1
|
|
|
23, 229, 239, 283, 359, 563, 599, 683, 809, 829, 853, 883, 1181, 1217, 1787, 1811, 1847, 2069, 2411, 2693, 2939, 3329, 3583, 4547, 4871, 4877, 5059, 5099, 5171, 5683, 5693, 5717, 6203, 6269, 6353, 6829, 7487, 7541, 8629, 8747, 9239, 9283, 10181
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|