OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
sd:= n -> convert(convert(n, base, 10), `+`):
select(isprime, map(sd, [$1..400])); # Robert Israel, Jan 20 2019
MATHEMATICA
Select[Array[Total@ IntegerDigits@ # &, 300], PrimeQ] (* Michael De Vlieger, Jan 20 2019 *)
PROG
(PARI) sdprime(n) = { local(x, y); for(x=1, n, y=sumdigits(x); if(isprime(y), print1(y", ") ) ) } sumdigits(n) = \ The sum of the digits of n { local(x, j, s=0); x=digits(n); for(j=1, length(x), s+=x[j]; ); return(s) } digits(n) = \ The vector of the digits of n { return(eval(Vec(Str(n)))) }
CROSSREFS
KEYWORD
AUTHOR
Cino Hilliard, Mar 13 2005
STATUS
approved