OFFSET
1,2
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000.
EXAMPLE
For n=7, 2^7=128 and 1+2+8=11, a prime. For n=23, 2^23=8388608 having the sum of its digits equaling 41.
MATHEMATICA
a={}; For[n=1, n<200, n++, If[PrimeQ[Plus @@ IntegerDigits[2^n]], AppendTo[a, n]]]; a (* Stefan Steinerberger, Jun 08 2007 *)
Select[Range[200], PrimeQ[Total[IntegerDigits[2^#]]]&] (* Harvey P. Dale, Jan 30 2018 *)
PROG
(R)
library(gmp); digsum<-function(x) sum(as.numeric(unlist(strsplit(as.character(x), split=""))))
which(isprime(sapply(as.character(as.bigz(2)^(1:100)), digsum))>0) #Christian N. K. Anderson, Apr 29 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Nov 02 2002
EXTENSIONS
More terms from Stefan Steinerberger, Jun 08 2007
STATUS
approved