login
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.
1
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,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..2900
EXAMPLE
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.
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 *)
PROG
(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)
CROSSREFS
Subsequence of A119449. ssd(n) = A003132(n).
Sequence in context: A138075 A222315 A185556 * A216347 A377762 A214137
KEYWORD
nonn,base
AUTHOR
Underwood Dudley, Will Gosnell, Charles R Greathouse IV, and Robert Israel, Aug 09 2013
STATUS
approved