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.

A136027 Smallest prime of the form (p-2n)/(2n+1) with p prime.

Original entry on oeis.org

3, 3, 5, 5, 3, 7, 3, 3, 5, 3, 5, 5, 3, 5, 13, 3, 3, 11, 5, 3, 5, 3, 5, 5, 19, 3, 7, 3, 5, 7, 3, 5, 5, 11, 3, 13, 5, 3, 7, 7, 3, 5, 3, 17, 7, 5, 3, 11, 5, 23, 5, 3, 5, 5, 3, 5, 7, 3, 11, 7, 3, 3, 5, 5, 3, 5, 5, 3, 11, 3, 3, 13, 3, 11, 11, 7, 3, 5, 5, 3, 5, 3, 11, 5, 3, 3, 5, 5
Offset: 1

Views

Author

Artur Jasinski, Dec 10 2007

Keywords

Comments

The associated p are in A136026.

Examples

			a(1)=3 because 3 is smallest prime of the form (p-2)/3; in this case prime(k)=11.
a(2)=3 because 3 is smallest prime of the form (p-4)/5; in this case prime(k)=19.
a(3)=5 because 5 is smallest prime of the form (p-6)/7; in this case prime(k)=41.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ !PrimeQ[(Prime[k] - 2n)/(2n + 1)], k++ ]; AppendTo[a, (Prime[k] - 2n)/(2n + 1)], {n, 1, 100}]; a
  • PARI
    a(n)=forprime(p=2,,if(isprime(2*n*(p+1)+p),return(p))) \\ Charles R Greathouse IV, Mar 21 2013

Extensions

Edited by R. J. Mathar, May 17 2009