%I #20 Dec 14 2014 02:22:44
%S 2,7,23,47,79,167,241,359,727,839,1367,1847,2207,2399,3719,5039,6857,
%T 7919,10607,11447,14639,16127,17159,19319,19681,28559,29789,29927,
%U 36479,44519,49727,50651,54287,57119,66047,85847,97967,113567,128879
%N Primes p of form q^k-2 where q is also a prime and k > 1.
%C 79=3^4-2, 243=3^5-2.
%t Do[s=2+Prime[n]; If[Equal[Length[FactorInteger[s]], 1]&&!PrimeQ[s], Print[s-2]], {n, 1, 100000}]
%t fQ[n_] := PrimeNu[n + 2] == 1 && ! PrimeQ[n + 2]; Select[ Prime@ Range@ 15000, fQ] (* _Robert G. Wilson v_, Apr 01 2012 *)
%o (PARI) lista(nn) = forprime (p=1, nn, if (ispower(p+2,,&q) && isprime(q), print1(p, ", ")); ); \\ _Michel Marcus_, Dec 11 2014
%Y Cf. A025475. Subsequence of A053705.
%K nonn
%O 1,1
%A _Labos Elemer_, Feb 14 2000
%E Definition corrected by _Zak Seidov_, Dec 11 2014
|