A107289 Numbers k such that the sum of digits of k^2 is a prime.
4, 5, 7, 16, 17, 25, 26, 28, 29, 32, 34, 37, 38, 40, 44, 47, 49, 50, 52, 53, 56, 61, 62, 64, 65, 70, 73, 79, 82, 83, 89, 91, 98, 106, 107, 109, 115, 116, 118, 119, 125, 127, 133, 137, 142, 143, 146, 149, 151, 154, 155, 160, 161, 164, 170, 173, 181, 182, 187, 188, 199
Offset: 1
Crossrefs
Cf. A065408.
Programs
-
Mathematica
bb={};Do[If[PrimeQ[Apply[Plus, IntegerDigits[n^2]]], bb=Append[bb, n]], {n, 500}];bb
-
PARI
isok(n) = isprime(sumdigits(n^2)); \\ Michel Marcus, Jan 09 2019
Formula
a(n) = sqrt(A065408(n)).
Comments