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.

Showing 1-1 of 1 results.

A191751 Least k such that (2^n-1)*2^n - k is a prime number.

Original entry on oeis.org

0, 1, 3, 1, 1, 5, 3, 11, 1, 1, 25, 29, 3, 13, 3, 7, 39, 1, 13, 23, 3, 5, 69, 11, 39, 13, 15, 31, 99, 83, 117, 31, 9, 11, 25, 67, 45, 1, 39, 47, 45, 71, 69, 77, 1, 131, 67, 101, 55, 1, 9, 41, 13, 43, 33, 233, 1, 113, 7, 29, 45, 55, 99, 41, 261, 5, 15, 343, 9
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 14 2011, Jun 15 2011

Keywords

Examples

			a(1)=0 because (2^1-1)*2^1 - 0 =    2 is prime,
a(2)=1 because (2^2-1)*2^2 - 1 =   11 is prime,
a(3)=3 because (2^3-1)*2^3 - 3 =   53 is prime,
a(4)=1 because (2^4-1)*2^4 - 1 =  239 is prime,
a(5)=1 because (2^5-1)*2^5 - 1 =  991 is prime,
a(6)-5 because (2^6-1)*2^6 - 5 = 4027 is prime.
		

Crossrefs

Cf. A020522 ((2^n-1)*2^n).

Programs

  • Maple
    a := proc(n) local k: for k from 0 do if(isprime((2^n-1)*2^n-k))then return k: fi: od: end: seq(a(n), n=1..69); # Nathaniel Johnston, Jun 14 2011
  • Mathematica
    lk[n_]:=Module[{c=2^n,k=0},While[!PrimeQ[c(c-1)-k],k++];k]; Array[lk,70] (* Harvey P. Dale, Jul 02 2018 *)
  • PARI
    a(n) = my(x=(2^n-1)*2^n); x - precprime(x); \\ Michel Marcus, Feb 21 2019
Showing 1-1 of 1 results.