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.

A179549 Primes p such that p minus the sum of the square of its digits yields a prime.

Original entry on oeis.org

13, 53, 127, 233, 257, 293, 457, 521, 541, 547, 587, 857, 983, 1151, 1153, 1429, 1481, 1489, 1511, 1553, 1559, 1579, 1621, 1753, 1861, 2099, 2129, 2143, 2239, 2273, 2341, 2347, 2383, 2411, 2417, 2459, 2549, 2657, 2677, 2729, 2741, 2789, 2837, 2897, 2927
Offset: 1

Views

Author

Carmine Suriano, Jul 19 2010

Keywords

Comments

This sequence differs from A076163 which takes the absolute value of the difference.

Examples

			a(5)=257 since 257-(2^2+5^2+7^2)=179 is a prime.
		

Crossrefs

Programs

  • Mathematica
    ssdQ[n_]:=Module[{c=n-Total[IntegerDigits[n]^2]},Positive[c]&&PrimeQ[c]]; Select[Prime[Range[500]],ssdQ] (* Harvey P. Dale, Dec 26 2018 *)
  • PARI
    isok(n) = {if (isprime(n), digs = digits(n, 10); isprime(n - sum(i=1, #digs, digs[i]^2));, 0)} \\ Michel Marcus, Jul 18 2013

Extensions

A-number typo and signs in the example corrected - R. J. Mathar, Oct 23 2010