OFFSET
1,1
COMMENTS
Zeros are not permitted in p; thus, for example, 101 is not included. - Harvey P. Dale, May 25 2013
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 233: 233+(2+3+3) = 233+8 = 241, which is prime. 233+(2*3*3) = 233+18 = 251, which is prime.
MAPLE
filter:= proc(p) local L;
if not isprime(p) then return false fi;
L:= convert(p, base, 10);
if member(0, L) then return false fi;
isprime(p + convert(L, `+`)) and isprime(p + convert(L, `*`))
end proc:
select(filter, [seq(i, i=3..10000, 2)]); # Robert Israel, Feb 20 2024
MATHEMATICA
pppQ[n_]:=Module[{idn=IntegerDigits[n]}, !MemberQ[idn, 0]&&And@@PrimeQ[ {n+ Total[idn], n+Times@@idn}]]; Select[Prime[Range[1200]], pppQ] (* Harvey P. Dale, May 25 2013 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ray G. Opao, Apr 08 2004
EXTENSIONS
More terms from Robert G. Wilson v, Apr 10 2004
STATUS
approved