login
A227948
Zeroless numbers n such that n + (product of digits of n) and n - (product of digits of n) are prime.
0
21, 23, 27, 29, 81, 83, 253, 293, 299, 343, 347, 349, 431, 437, 439, 471, 473, 477, 529, 623, 653, 659, 677, 743, 893, 1123, 1219, 1253, 1257, 1297, 1423, 1489, 1521, 1523, 1529, 1587, 1589, 1657, 1763, 1853, 1867, 1927, 2151, 2167, 2239, 2277, 2279, 2321, 2327, 2329, 2377, 2413, 2443, 2459, 2467, 2497, 2543, 2569
OFFSET
1,1
COMMENTS
Intersection of A157676 and A229221 (without the primes containing zero digits).
EXAMPLE
29 - 2*9 = 11 (prime) and 29 + 2*9 = 47 (prime) so 29 is a member of this sequence.
743 - 7*4*3 = 659 (prime) and 743 + 7*4*3 = 827 (prime) so 743 is a member of this sequence.
PROG
(Python)
from sympy import isprime
def DP(n):
..p = 1
..for i in str(n):
....p *= int(i)
..return p
{print(n, end=', ') for n in range(5000) if DP(n) and isprime(n+DP(n)) and isprime(n-DP(n))}
## Simplified by Derek Orr, Apr 05 2015
(PARI) for(n=1, 5000, d=digits(n); p=prod(i=1, #d, d[i]); if(p&&isprime(n+p)&&isprime(n-p), print1(n, ", "))) \\ Derek Orr, Apr 05 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Derek Orr, Oct 04 2013
EXTENSIONS
More terms from Derek Orr, Apr 05 2015
STATUS
approved