OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1003
EXAMPLE
For 147 we have (1*4*7) + 1 = 29, (1+4+7) + 1 = 13, (1+4+7) - 1 = 11.
MAPLE
a := proc (n) local nn: nn := convert(n, base, 10): if isprime(1+product(nn[j], j = 1 .. nops(nn))) = true and isprime(1+sum(nn[j], j = 1 .. nops(nn))) = true and isprime(-1+sum(nn[j], j = 1 .. nops(nn))) = true then n else end if end proc: seq(a(n), n = 1 .. 615); # Emeric Deutsch, Aug 02 2009
PROG
(PARI) isok(k)={my(d=digits(k), s=vecsum(d)); isprime(s+1) && isprime(s-1) && isprime(vecprod(d)+1)} \\ Harry J. Smith, Jul 25 2009
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felice Russo, May 22 2001
EXTENSIONS
a(1)=4 and a(2)=6 added by Emeric Deutsch, Aug 02 2009
STATUS
approved