This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A339692 #16 Dec 15 2020 18:29:38 %S A339692 5,7,13,19,29,31,43,53,61,73,89,103,109,131,139,151,173,181,193,199, %T A339692 229,241,271,283,293,313,349,421,433,463,523,571,601,619,643,661,811, %U A339692 823,829,859,883,1021,1033,1051,1063,1093,1153,1231,1279,1291,1303,1321,1373,1429,1453,1483,1489,1609 %N A339692 Primes that can be expressed as p^k+2*k where p is prime and k >= 1. %C A339692 Terms expressible in more than one way include %C A339692 13 = 11^1 + 2*1 = 3^2 + 2*2 %C A339692 349 = 347^1 + 2*1 = 7^3 + 2*3 %C A339692 78139 = 78137^^1 + 2*1 = 5^7 + 2*7 %C A339692 1092733 = 1092731^1 + 2*1 = 103^3 + 2*3 %C A339692 22665193 = 22665191^1 + 2*1 = 283^3 + 2*3. %H A339692 Robert Israel, <a href="/A339692/b339692.txt">Table of n, a(n) for n = 1..10000</a> %e A339692 a(5) = 29 is a term because 29 = 5^2 + 2*2. and 5 and 29 are primes. %p A339692 N:= 1000: # for terms <= N %p A339692 S:= {}: %p A339692 for n from 1 while 3^n + 2*n <= N do %p A339692 p:= 2: %p A339692 do %p A339692 p:= nextprime(p); %p A339692 q:= p^n + 2*n; %p A339692 if q > N then break fi; %p A339692 if isprime(q) then S:= S union {q}; %p A339692 fi %p A339692 od od: %p A339692 sort(convert(S,list)); %t A339692 Block[{nn = 1610, a = {}}, Do[Do[Which[# > nn, Break[], PrimeQ[#], AppendTo[a, #]] &[(#^k) + 2 k], {k, Infinity}] &[Prime@ i], {i, 2, PrimePi@ nn}]; Union@ a] (* _Michael De Vlieger_, Dec 13 2020 *) %o A339692 (PARI) isok(p) = {if (isprime(p), for(k=1, p\2, if (k==isprimepower(p-2*k), return(1));););} \\ _Michel Marcus_, Dec 13 2020 %Y A339692 Includes A006512, A045637 and A201308. %K A339692 nonn %O A339692 1,1 %A A339692 _J. M. Bergot_ and _Robert Israel_, Dec 13 2020