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.

This page as a plain text file.
%I A053704 #18 Aug 27 2024 09:14:54
%S A053704 4,9,25,49,81,169,243,361,729,841,1369,1849,2209,2401,3721,5041,6859,
%T A053704 7921,10609,11449,14641,16129,17161,19321,19683,28561,29791,29929,
%U A053704 36481,44521,49729,50653,54289,57121,66049,85849,97969,113569,128881
%N A053704 Prime powers p^w (w >= 2) such that p^w-2 is prime.
%C A053704 Terms k of A025475 such that k - 2 is prime.
%H A053704 Amiram Eldar, <a href="/A053704/b053704.txt">Table of n, a(n) for n = 1..10000</a>
%F A053704 a(n) = A053705(n) + 2. - _Amiram Eldar_, Aug 27 2024
%e A053704 4 = 2^2 is a term since 4-2 = 2 is prime.
%e A053704 243 = 3^5 is a term because 241 is prime.
%t A053704 Select[Range[130000],!PrimeQ[#]&&PrimePowerQ[#]&&PrimeQ[#-2]&] (* _Harvey P. Dale_, Oct 07 2020 *)
%t A053704 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 *)
%Y A053704 Cf. A025475, A053705.
%K A053704 nonn
%O A053704 1,1
%A A053704 _Labos Elemer_, Feb 14 2000
%E A053704 Definition clarified by _Harvey P. Dale_, Oct 07 2020