Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Apr 08 2024 21:32:10
%S 2,5,13,17,29,31,37,41,43,53,59,61,73,89,97,101,109,113,127,137,149,
%T 157,173,181,193,197,223,229,233,241,251,257,269,277,281,283,293,307,
%U 313,317,337,347,349,353,359,373,379,389,397,401,409,421,433,439,443,449
%N Prime numbers that are the sum of two perfect powers.
%H Robert Israel, <a href="/A109515/b109515.txt">Table of n, a(n) for n = 1..10000</a>
%e The prime 17 is a term because 17 = 2^3 + 3^2.
%p N:= 1000:
%p PP:= {1, seq(seq(x^k,x=2..floor(N^(1/k))), k=2..ilog2(N))}:
%p A:= select(t -> t<=N and isprime(t), {seq(seq(PP[i]+PP[j],i=1..j),j=1..nops(PP))}):
%p sort(convert(A,list)); # _Robert Israel_, Jan 22 2018
%t lim=450;Select[Union[Total/@Permutations[Flatten[Table[Union[Select[Range[2, lim], ResourceFunction["PerfectPowerQ"][#]&], {1}], 2]], {2}]], PrimeQ[#]&&#<lim&] (* _James C. McMahon_, Apr 08 2024 *)
%Y Cf. A001597 (perfect powers). Includes A002144.
%K nonn
%O 1,1
%A _Rick L. Shepherd_, Jul 01 2005
%E Offset changed to 1 by _Robert Israel_, Jan 22 2018