A076163 Primes p such that the absolute value of p minus the sum of squares of digits of p is also prime.
2, 13, 53, 59, 127, 233, 257, 293, 457, 521, 541, 547, 587, 857, 983, 1151, 1153, 1429, 1481, 1489, 1511, 1553, 1559, 1579, 1621, 1753, 1861, 2099, 2129, 2143, 2239, 2273, 2341, 2347, 2383, 2411, 2417, 2459, 2549, 2657, 2677, 2729, 2741
Offset: 1
Examples
13 is OK because 13-(1^2+3^2)=3 is a prime.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1001
Programs
-
Mathematica
Select[Prime[Range[1,400]],PrimeQ[Abs[#-Total[IntegerDigits[#]^2]]]&] (* Harvey P. Dale, Mar 31 2012 *)
Extensions
Definition corrected, specifying that the absolute value must be used Carmine Suriano, Jul 19 2010
Missing a(1)=2 inserted by Sean A. Irvine, Mar 22 2025