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.

A157677 Primes p such that p + (product of digits of p) is also prime.

Original entry on oeis.org

23, 29, 61, 67, 83, 101, 103, 107, 109, 163, 233, 239, 283, 293, 307, 347, 349, 401, 409, 431, 439, 443, 449, 499, 503, 509, 563, 569, 601, 607, 613, 617, 619, 653, 659, 677, 683, 701, 709, 743, 809, 907, 929, 941, 1009, 1013, 1019, 1021, 1031, 1033, 1039
Offset: 1

Views

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Comments

If p contains a zero, then p is trivially a member.

Examples

			83 is prime, and 83 + 8*3 = 89 which is also prime. 103 is prime, and 103 + 1*0*3 = 103 is also prime. Thus 89 and 103 are members.
		

Crossrefs

Union of A092518 and A056709.
Cf. A225303.

Programs

  • Maple
    a := proc (n) local nn: nn := convert(ithprime(n), base, 10): if isprime(ithprime(n)+product(nn[j], j = 1 .. nops(nn))) = true then ithprime(n) else end if end proc: seq(a(n), n = 1 .. 180); # Emeric Deutsch, Mar 08 2009
  • Mathematica
    Select[Prime[Range[175]], PrimeQ[# + Times @@ IntegerDigits[#]] &] (* Jayanta Basu, Apr 22 2013 *)
  • PARI
    dprod(n)=n=digits(n); prod(i=1,#n,n[i])
    is(n)=isprime(n) && isprime(n+dprod(n)) \\ Charles R Greathouse IV, Dec 27 2013

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Apr 22 2013

Extensions

More terms from Emeric Deutsch, Mar 08 2009