A182404 Numbers whose digit sum as well as sum of the squares of the digits is a prime.
11, 12, 14, 16, 21, 23, 25, 32, 38, 41, 49, 52, 56, 58, 61, 65, 83, 85, 94, 101, 102, 104, 106, 110, 111, 113, 119, 120, 131, 133, 137, 140, 146, 160, 164, 166, 173, 179, 191, 197, 199, 201, 203, 205, 210, 223, 229, 230, 232, 250, 289, 292, 298, 302, 308
Offset: 1
Examples
25 is here because 2 + 5 = 7 and 2*2 + 5*5 = 29 both are prime.
Programs
-
Mathematica
fQ[n_] := Module[{d = IntegerDigits[n]}, PrimeQ[Total[d]] && PrimeQ[Total[d^2]]]; Select[Range[500], fQ] (* T. D. Noe, May 09 2012 *)
Formula
Extensions
Incorrect comment removed by Jason Yuen, Oct 15 2024