cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Underwood Dudley, Will Gosnell, Charles R Greathouse IV, and Robert Israel, Aug 09 2013

Keywords

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.
		

Crossrefs

Subsequence of A119449. ssd(n) = A003132(n).

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)