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.

A331204 Least m > n such that 2^m - 2^n + 1 is prime.

Original entry on oeis.org

1, 2, 3, 39, 5, 7, 8, 47, 9, 13, 14, 27, 14, 23, 17, 447, 17, 23, 20, 31, 23, 27, 34, 39, 31, 31, 29, 31, 43, 41, 32, 191, 40, 43, 49, 59, 38, 41, 42, 255, 64, 43, 65, 331, 48, 59, 62, 111, 52, 79, 53, 91, 55, 75, 61, 199, 71, 65, 86, 99, 65, 127, 74
Offset: 0

Views

Author

Hugo Pfoertner, Jan 12 2020

Keywords

Comments

If it exists, a(63) > 10000.

Examples

			a(0) = 1: 2^1 - 2^0 + 1 = 2 = A331205(0) is prime,
a(1) = 2: 2^2 - 2^1 + 1 = 3 = A331205(1) is prime,
a(2) = 3: 2^3 - 2^2 + 1 = 5 = A331205(2) is prime,
a(3) = 39: 2^39 - 2^3 + 1 = 549755813881 = A331205(3) is prime, whereas all smaller values of m give composite sums: 9, 25, 57, 121, 249, 505, ..., 274877906937.
		

Crossrefs

Cf. A181692, A331205 (corresponding primes).

Programs

  • PARI
    for(n=0,62, for(m=n+1,oo, k=2^m-2^n+1; if(isprime(k), print1(m,", "); break)))