%I #2 Mar 30 2012 17:30:59
%S 1,5,8,17,34,87,203,510,1331
%N Number of consecutive primes less than 10^n such that their sum is a perfect power (A091624).
%t NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; PrimeExponents[n_] := Flatten[ Table[ #[[2]], {1}] & /@ FactorInteger[n]]; c = 0; p = q = 2; Do[ While[p < 10^n, q = NextPrim[p]; If[ Apply[ GCD, PrimeExponents[p + q]] > 1, c++ ]; p = q]; Print[c], {n, 1, 8}]
%Y Cf. A001597, A091624.
%K nonn
%O 1,2
%A _Robert G. Wilson v_, Jan 24 2004