OFFSET
1,1
COMMENTS
Necessarily either m or k = 2, thus if a(n) is even, it is a power of 2 with odd prime exponent, otherwise (if a(n) is odd), it is a square of odd prime.
For each term m^k, there will be another k^m.
a(3), a(5), a(11) are of the form n! + 1.
EXAMPLE
a(1) = 8, because 8 = 2^3 and 2+3 = 5.
a(4) = 32, because 32 = 2^5 and 2+5 = 7.
a(5) = 121, because 121 = 11^2 and 11+2 = 13.
a(25) = 131072, because 131072 = 2^17 and 2+17 = 19.
MATHEMATICA
SmallestDivisor[n_] := If[n == 1, 1, Divisors[n][[2]]]; perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; ppl = Select[Range[200000], perfectPowerQ]; base[n_] := ppl[[n]]^(1/exp[n]); exp[n_] := SmallestDivisor[GCD @@ FactorInteger[ppl[[n]]][[All, 2]] ]; pp2l = Table[ {base[n], exp[n]}, {n, Length[ppl]}]; p[n_] := pp2l[[n]][[1]]; q[n_] := pp2l[[n]][[2]]; lt = Select[Range[Length[pp2l]], PrimeQ[p[#]] && PrimeQ[q[#]] && PrimeQ[p[#] + q[#]] &]; ppl[[lt]]
Select[Range[10^6], Length[f = FactorInteger@ #] == 1 && PrimeQ@ f[[1, 2]] && PrimeQ@ Total@ f[[1]] &] (* Giovanni Resta, Jun 23 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Carlos Eduardo Olivieri, May 28 2015
EXTENSIONS
a(28)-a(38) from Giovanni Resta, Jun 23 2015
STATUS
approved