A053704 Prime powers p^w (w >= 2) such that p^w-2 is prime.
4, 9, 25, 49, 81, 169, 243, 361, 729, 841, 1369, 1849, 2209, 2401, 3721, 5041, 6859, 7921, 10609, 11449, 14641, 16129, 17161, 19321, 19683, 28561, 29791, 29929, 36481, 44521, 49729, 50653, 54289, 57121, 66049, 85849, 97969, 113569, 128881
Offset: 1
Keywords
Examples
4 = 2^2 is a term since 4-2 = 2 is prime. 243 = 3^5 is a term because 241 is prime.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[130000],!PrimeQ[#]&&PrimePowerQ[#]&&PrimeQ[#-2]&] (* Harvey P. Dale, Oct 07 2020 *) 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]]; seq[150000] (* Amiram Eldar, Aug 27 2024 *)
Formula
a(n) = A053705(n) + 2. - Amiram Eldar, Aug 27 2024
Extensions
Definition clarified by Harvey P. Dale, Oct 07 2020
Comments