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.

A225659 Primes p where p + sumOfDigits(p) +- 3 is prime.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 131, 137, 139, 157, 173, 179, 191, 197, 223, 227, 229, 241, 263, 269, 283, 311, 313, 317, 337, 353, 359, 373, 379, 397, 401, 409, 421, 443, 449, 463, 467, 487, 557
Offset: 1

Views

Author

John-Å. W. Olsen, May 11 2013

Keywords

Comments

a(n) = A068690(n), A030144(n), A069556(n), A091727(n), A156756(n) if n<14.

Examples

			If p = 409, then 409 + sod(409) +- 3 = 409+13 - 3 = 419, which is prime.
If p =  23, then  23 + sod(23)  +- 3 = 23+5   + 3 = 31,  which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[102]],Or@@PrimeQ[#+Total[IntegerDigits[#]]+{3,-3}] &] (* Jayanta Basu, May 23 2013 *)
  • PARI
    ok(p)= {my(s=vecsum(digits(p)));isprime(p) && (isprime(p+s-3) || isprime(p+s+3))}
    select(ok,[1..1000]) \\ Andrew Howroyd, Feb 22 2018