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-3 of 3 results.

A053703 Primes q of form q=p^w+2 where p is odd prime, w>=2.

Original entry on oeis.org

11, 29, 83, 127, 6563, 24391, 59051, 161053, 357913, 571789, 1442899, 4782971, 5177719, 14348909, 18191449, 30080233, 73560061, 80062993, 118370773, 127263529, 131872231, 318611989, 344472103
Offset: 1

Views

Author

Labos Elemer, Feb 14 2000

Keywords

Comments

For even w, p=3 is the only prime for which p^w+2 can be prime because all primes greater than 3 have the form 6k+-1. For odd w, only primes p=3 and p=6k-1 need to be considered because all primes of the form p=6k+1 will produce a number p^w+2 that is divisible by 3. - T. D. Noe, Feb 25 2011

Examples

			11=3^2+2, 127=5^3+2, 83=3^4+2, 161051=11^5+2,.. 318611989=683^2+2, 344472103=701^3+2
		

Crossrefs

Cf. A025475.

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; fi=FactorInteger[p-2]; If[Length[fi]==1 && Last[Last[fi]]>1, AppendTo[lst,p]], {n,20000000}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 25 2011 *)
    nn=10^9; t=Table[Select[Table[2 + Prime[i]^k, {i, PrimePi[nn^(1/k)]}], PrimeQ], {k, 2, Log[3, nn]}]; Union[Flatten[t]] (* T. D. Noe, Feb 25 2011 *)

Formula

Primes of A025475(n)+2 form, excluding 1+2.
a(n) = A053702(n)+2. [R. J. Mathar, Apr 18 2010]

Extensions

Constraint on w added to definition. a(11) appended by R. J. Mathar, Apr 18 2010

A074852 Composite n such that n and n+2 are prime powers.

Original entry on oeis.org

9, 25, 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
Offset: 1

Views

Author

Benoit Cloitre, Sep 10 2002

Keywords

Crossrefs

Programs

  • PARI
    list(lim)=my(v=List(),t);lim+=.5;for(e=2,log(lim)\log(3), forprime(p=3, lim^(1/e),ispower(t=p^e+2,,&t); if(isprime(t), listput(v,p^e)))); vecsort(Vec(v))
    \\ Charles R Greathouse IV, Apr 30 2012
    
  • PARI
    list(lim)=my(v=List());if(lim>=25,listput(v,25));lim+=.5;for(e=2, log(lim)\log(3), forprime(p=3, lim^(1/e),if(isprime(p^e+2), listput(v, p^e)))); vecsort(Vec(v))
    /* This second program assumes A076427(2) = 1 but is about a hundred times faster. I proved that it is correct up to 10^20 without this assumption. */
    \\ Charles R Greathouse IV, Apr 30 2012

Extensions

More terms from Sascha Kurz, Jan 30 2003

A001092 Union of all numbers {p, q} where p and q are both primes or powers of primes and q = p+2.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 41, 43, 47, 49, 59, 61, 71, 73, 79, 81, 83, 101, 103, 107, 109, 125, 127, 137, 139, 149, 151, 167, 169, 179, 181, 191, 193, 197, 199, 227, 229, 239, 241, 243, 269, 271, 281, 283, 311, 313, 347, 349, 359
Offset: 1

Views

Author

Keywords

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.

Crossrefs

Programs

  • PARI
    {isprimepower(n)=matsize(factor(n))[1]==1} for(n=1,400,if(isprimepower(n)&&(isprimepower(n-2)||isprimepower(n+2)),print1(n","))) \\ Ralf Stephan, Aug 20 2004

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 14 2001
Showing 1-3 of 3 results.