cp's OEIS Frontend

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.

A053704 Prime powers p^w (w >= 2) such that p^w-2 is prime.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Feb 14 2000

Keywords

Comments

Terms k of A025475 such that k - 2 is prime.

Examples

			4 = 2^2 is a term since 4-2 = 2 is prime.
243 = 3^5 is a term because 241 is prime.
		

Crossrefs

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