A227785 Primes p such that p - ssd(p) is the square of a prime, where ssd(k) is the sum of the squared decimal digits of k.
11, 2903, 3533, 3803, 5197, 9533, 18973, 24763, 37321, 73561, 96953, 113621, 124777, 129097, 134837, 139241, 398341, 830003, 1100509, 1585201, 1661789, 2211257, 4541309, 4871077, 4897709, 5340949, 5958751, 7393123, 8185501, 8744003, 11485559, 15343039, 15343079
Offset: 1
Examples
11 is a member since 11 - 2 = 3^2 where 3 is prime. 2903 is a member since 2903 - 94 = 53^2 where 53 is prime.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..2900
Programs
-
Maple
ssd:= n->add(d^2,d=convert(n,base,10)); S:= select(t -> type(sqrt(t - ssd(t)),prime), [seq(ithprime(j),j=1..10^5)]);
-
Mathematica
fQ[n_] := PrimeQ[ Sqrt[ n - Total[ IntegerDigits[ n]^2]]]; p = 2; lst = {}; While[p < 15500000, If[ fQ@ p, AppendTo[ lst, p]]; p = NextPrime@ p]; lst (* Robert G. Wilson v, Jun 01 2014 *)
-
PARI
ssd(n)=my(d=digits(n));sum(i=1,#d,d[i]^2) v=List();forprime(p=2,1e5,if(issquare(p-ssd(p),&t) && isprime(t), listput(v,p))); Vec(v)