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.

A342961 Primes p such that p + the sum of its prime digits is prime.

Original entry on oeis.org

11, 19, 29, 37, 41, 53, 61, 73, 89, 101, 109, 149, 181, 191, 199, 229, 233, 257, 269, 277, 281, 307, 331, 359, 379, 383, 401, 409, 419, 433, 449, 461, 491, 499, 563, 587, 593, 601, 619, 641, 653, 661, 673, 677, 691, 727, 797, 809, 811, 821, 881, 911, 919, 937, 941, 977, 991, 1009, 1019, 1033
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 31 2021

Keywords

Examples

			a(3) = 29 is a term because it is prime, the sum of its prime digits is 2, and 29+2 = 31 is also prime.
		

Crossrefs

Includes A034844. Cf. A085563, A342962.

Programs

  • Maple
    f:= p -> p + convert(select(isprime,convert(p,base,10)),`+`):
    select(t -> isprime(t) and isprime(f(t)), [seq(i,i=3..2000,2)]);
  • Mathematica
    Select[Prime@Range@200,PrimeQ@Total[Join[{#},Select[IntegerDigits@#,PrimeQ]]]&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
  • PARI
    isok(p) = isprime(p) && isprime(p+sumdigits(p)); \\ Michel Marcus, Apr 01 2021