OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
7^2=49 and 4+9=13 is prime.
MAPLE
P:=proc(n) local cont, i, k, w; if isprime(n) then cont:=0; while cont<1000 do cont:=cont+1; w:=0; k:=n^cont; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if isprime(w) then print(cont); fi; od; fi; end: P(7);
MATHEMATICA
a={}; For[n=1, n<700, n++, If[PrimeQ[Plus@@IntegerDigits[7^n]], AppendTo[a, n]]]; a (* Vincenzo Librandi, Apr 17 2013 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Oct 30 2007
STATUS
approved