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.

A194608 Smallest prime either of the form prime(n)*2^k - 1 or prime(n)*2^k + 1, k >= 0, or 0 if no such prime exists, where prime(n) denotes the n-th prime number.

Original entry on oeis.org

3, 2, 11, 13, 23, 53, 67, 37, 47, 59, 61, 73, 83, 173, 751, 107, 1889, 487, 269, 283, 293, 157, 167, 179, 193, 809, 823, 857, 6977, 227, 509, 263, 547, 277, 1193, 2417, 313, 653, 2671, 347, 359, 1447, 383, 773, 787, 397, 421, 1783, 907, 457, 467, 479, 493567
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 30 2011

Keywords

Comments

Primes arising from A194606 (or 0 if no such prime exists).

Examples

			For n=4, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(4)=13.
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; k = 0; While[! PrimeQ[a = p*2^k - 1] && ! PrimeQ[a = p*2^k + 1], k++]; a, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *)