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.

A078683 Least prime of the form n*2^m+1 for m>0, or 0 if there is no such prime.

Original entry on oeis.org

3, 5, 7, 17, 11, 13, 29, 17, 19, 41, 23, 97, 53, 29, 31, 257, 137, 37, 1217, 41, 43, 89, 47, 97, 101, 53, 109, 113, 59, 61, 7937, 257, 67, 137, 71, 73, 149, 1217, 79, 641, 83, 337, 173, 89, 181, 11777
Offset: 1

Views

Author

Benoit Cloitre, Dec 17 2002

Keywords

Comments

The next prime has 178 digits. See A078680 for the values of m.

Crossrefs

Cf. A078680.

Programs

  • Mathematica
    Table[m=1; While[! PrimeQ[p = n*2^m + 1], m++]; p, {n, 50}]
  • PARI
    a(n)=if(n<0, 0, m=1; while(isprime(n*2^m+1)==0, m++); n*2^m+1)

Extensions

Edited by T. D. Noe, Feb 25 2011