OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
163 + (1+6+3) = 173, 163 + 1*6*3 = 181; 173 and 181 are prime numbers.
MAPLE
filter:= proc(n) local S;
S:= convert(n, base, 10);
isprime(n+convert(S, `+`)) and isprime(n+convert(S, `*`))
end proc:
A:= NULL:
p:= 2:
while p < 10000 do
if filter(p) then A:= A, p fi;
p:= nextprime(p)
od:
A; # Robert Israel, Jul 12 2017
MATHEMATICA
Select[Prime[Range[500]], PrimeQ[ # + Plus @@ IntegerDigits[ # ]] && PrimeQ[ # + Times @@ IntegerDigits[ # ]] &]
PROG
(PARI) isok(n) = isprime(n) && (isprime(n+sumdigits(n)) && ((d=digits(n)) && isprime(n+prod(k=1, #d, d[k])))); \\ Michel Marcus, Jul 12 2017
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
J. M. Bergot, Jun 27 2007
EXTENSIONS
Edited, corrected and extended by Stefan Steinerberger, Jul 14 2007
STATUS
approved