OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A053704(n) - 2. - Amiram Eldar, Aug 27 2024
EXAMPLE
79 = 3^4-2.
241 = 3^5-2.
MATHEMATICA
Do[s=2+Prime[n]; If[Equal[Length[FactorInteger[s]], 1]&&!PrimeQ[s], Print[s-2]], {n, 1, 100000}]
fQ[n_] := PrimeNu[n + 2] == 1 && ! PrimeQ[n + 2]; Select[ Prime@ Range@ 15000, fQ] (* Robert G. Wilson v, Apr 01 2012 *)
seq[max_] := Module[{s = {}, p = 2}, While[p^2 <= max, s = Join[s, Select[p^Range[2, Floor[Log[p, max]]], PrimeQ[# - 2] &]]; p = NextPrime[p]]; Union[s] - 2]; seq[150000] (* Amiram Eldar, Aug 27 2024 *)
PROG
(PARI) lista(nn) = forprime (p=1, nn, if (ispower(p+2, , &q) && isprime(q), print1(p, ", ")); ); \\ Michel Marcus, Dec 11 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 14 2000
EXTENSIONS
Definition corrected by Zak Seidov, Dec 11 2014
STATUS
approved