login

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”).

Primes that are of the form p^k-2 for some k > 3 and prime p.
1

%I #14 Aug 17 2021 02:15:02

%S 79,241,727,2399,14639,19681,28559,371291,707279,823541,1771559,

%T 2825759,3418799,5764799,7890479,12117359,24137567,28398239,28629149,

%U 47458319,104060399,1073283119,2565726407,3262808639,3373402559,5887339439,6103515623,7370050799,9354951839,10779215327,13841287199

%N Primes that are of the form p^k-2 for some k > 3 and prime p.

%H Robert Israel, <a href="/A347032/b347032.txt">Table of n, a(n) for n = 1..1000</a>

%e a(3) = 727 is a term because 727 = 3^6-2, 6 > 3 and 727 and 3 are prime.

%p N:= 10^12: # for terms <= N

%p R:= {}:

%p p:= 1:

%p do

%p p:= nextprime(p);

%p if p^4-2 > N then break fi;

%p for k from 4 to ilog[p](N) do

%p r:= p^k - 2;

%p if isprime(r) then R:= R union {r} fi;

%p od

%p od:

%p sort(convert(R,list));

%o (PARI) isok(p) = isprime(p) && (isprimepower(p+2) > 3); \\ _Michel Marcus_, Aug 16 2021

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Aug 11 2021