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.

A381878 Prime numbers p such that the sum of the d_i-th prime numbers, where (d_i) are the nonzero digits of p, is also a prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 71, 103, 107, 181, 211, 223, 227, 229, 233, 239, 257, 277, 293, 347, 383, 389, 433, 443, 449, 467, 479, 487, 499, 523, 563, 569, 587, 647, 653, 659, 677, 683, 701, 727, 743, 769, 787, 811, 839, 857, 859, 863, 877, 883, 947, 967, 983
Offset: 1

Views

Author

Jean-Marc Rebert, Mar 09 2025

Keywords

Examples

			13 is a term, because prime(1) + prime(3) = 2 + 5 = 7 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[170]], PrimeQ[Total[Prime[DeleteCases[IntegerDigits[#],0]]]] &] (* Stefano Spezia, Mar 09 2025 *)
  • Python
    from sympy import isprime, prime
    def ok(p): return isprime(p) and isprime(sum(prime(di) for di in map(int, str(p)) if di))
    print([k for k in range(1, 999) if ok(k)]) # Michael S. Branicky, Mar 09 2025