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.

Showing 1-2 of 2 results.

A053702 Odd prime powers p^w (w>1) such that p^w+2 is prime.

Original entry on oeis.org

9, 27, 81, 125, 6561, 24389, 59049, 161051, 357911, 571787, 1442897, 4782969, 5177717, 14348907, 18191447, 30080231, 73560059, 80062991, 118370771, 127263527, 131872229, 318611987, 344472101, 440711081, 461889917, 590589719, 756058031, 865523177
Offset: 1

Views

Author

Labos Elemer, Feb 14 2000

Keywords

Examples

			Examples: powers of 3 like 9,27,81,6561,59049; powers of 5 like 125; others like 23^3=24389, 71^3=357911, 83^3=571787, 11^5=161051, ...
		

Crossrefs

Programs

  • Mathematica
    Table[Do[s=2+Prime[w]^n; If[PrimeQ[s]&&!Greater[s, 10000000000], Print[s]], {n, 2, 35}], {w, 1, 1000}]

Formula

A025475(n)+2 is prime

A053705 Primes p of form q^k-2 where q is also a prime and k > 1.

Original entry on oeis.org

2, 7, 23, 47, 79, 167, 241, 359, 727, 839, 1367, 1847, 2207, 2399, 3719, 5039, 6857, 7919, 10607, 11447, 14639, 16127, 17159, 19319, 19681, 28559, 29789, 29927, 36479, 44519, 49727, 50651, 54287, 57119, 66047, 85847, 97967, 113567, 128879
Offset: 1

Views

Author

Labos Elemer, Feb 14 2000

Keywords

Examples

			79 = 3^4-2.
241 = 3^5-2.
		

Crossrefs

Subsequence of A267944.

Programs

  • 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 *)
  • PARI
    lista(nn) = forprime (p=1, nn, if (ispower(p+2,,&q) && isprime(q), print1(p, ", ")); ); \\ Michel Marcus, Dec 11 2014

Formula

a(n) = A053704(n) - 2. - Amiram Eldar, Aug 27 2024

Extensions

Definition corrected by Zak Seidov, Dec 11 2014
Showing 1-2 of 2 results.