%I #14 Aug 25 2021 16:11:38
%S 2,3,4,5,6,11,14,17,18,23,26,35,48,50,51,76,90,92,94,124,143,145,158,
%T 159,172,173,176,177,197,230,233,254,276,317,323,333,335,352,354,355,
%U 356,386,389,405,431,440,459,472,475,480,488
%N Numbers k such that k-th perfect power - k is prime: A001597(k) - k is prime.
%e k=3: pp(3)-3 = 8-3 = 5 is prime.
%t With[{s = {1}~Join~Select[Range[4, 2*10^5], GCD @@ FactorInteger[#][[All, -1]] > 1 &]}, Select[Range@ Length@ s, PrimeQ[s[[#]] - #] &]] (* _Michael De Vlieger_, Aug 25 2021 *)
%o (PARI) lista(nn) = {n = 0; for (pn=1, nn, if (pn==1 || ispower(pn), n++; if (isprime(pn - n), print1(n, ", "));););} \\ _Michel Marcus_, Jun 05 2013
%Y Cf. A001597.
%K easy,nonn
%O 1,1
%A _Zak Seidov_, Oct 11 2002
%E Edited by _Georg Fischer_, Aug 25 2021