OFFSET
1,6
COMMENTS
EXAMPLE
prime(1) = 2; 2^1 = 2 has prime sum of digits 2. Hence a(1) = 1.
prime(6) = 13; 13^1 = 13 has nonprime sum of digits 4; 13^2 = 169 has nonprime sum of digits 16; 13^3 = 2197 has prime sum of digits 19. Hence a(6) = 3.
MATHEMATICA
sdp[n_]:=Module[{k=1}, While[!PrimeQ[Total[IntegerDigits[Prime[n]^k]]], k++]; k]; Array[sdp, 110] (* Harvey P. Dale, Apr 13 2014 *)
PROG
(Magma) S:=[]; for n in [1..105] do j:=1; while not IsPrime(&+Intseq(NthPrime(n)^j)) do j+:=1; end while; Append(~S, j); end for; S;
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Klaus Brockhaus, Jan 29 2010
STATUS
approved