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.

A276121 Smallest odd integer k such that k*2^prime(n)-1 is a prime number.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 1, 13, 7, 1, 21, 15, 3, 31, 147, 45, 1, 43, 73, 15, 69, 91, 1, 51, 81, 3, 1, 9, 85, 1, 55, 169, 225, 109, 145, 15, 103, 615, 69, 259, 69, 63, 45, 285, 471, 9, 255, 169, 489, 69, 273, 427, 43, 391, 169, 201, 21, 159, 181, 103, 15, 339
Offset: 1

Views

Author

Pierre CAMI, Aug 21 2016

Keywords

Comments

When k=1 the prime k*2^prime(n)-1 is a Mersenne prime.

Examples

			1*2^7-1 = 127 prime so a(4) = 1 as prime(4)=7.
1*2^11-1 = 2047 composite, 3*2^11-1 = 6143 prime so a(5) = 3 as prime(5)=11.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[! PrimeQ[k 2^Prime@ n - 1], k += 2]; k, {n, 63}] (* Michael De Vlieger, Aug 21 2016 *)
  • PARI
    a(n) = {my(k=1); while (!isprime(k*2^prime(n)-1), k+=2); k;} \\ Michel Marcus, Aug 21 2016

Formula

a(n) = A126717(prime(n)). - Michel Marcus, Sep 07 2016