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.

A127582 a(n) = the smallest prime number of the form k*2^n - 1, for k >= 1.

This page as a plain text file.
%I A127582 #24 May 21 2019 03:46:32
%S A127582 2,3,3,7,31,31,127,127,1279,3583,5119,6143,8191,8191,81919,131071,
%T A127582 131071,131071,524287,524287,14680063,14680063,109051903,109051903,
%U A127582 654311423,738197503,738197503,2147483647,2147483647,2147483647
%N A127582 a(n) = the smallest prime number of the form k*2^n - 1, for k >= 1.
%H A127582 Robert Israel, <a href="/A127582/b127582.txt">Table of n, a(n) for n = 0..3310</a>
%F A127582 a(n) << 37^n by Xylouris's improvement to Linnik's theorem. - _Charles R Greathouse IV_, Dec 10 2013
%e A127582 a(0)=2 because 2 = 3*2^0 - 1 is prime.
%e A127582 a(1)=3 because 3 = 2*2^1 - 1 is prime.
%e A127582 a(2)=3 because 3 = 1*2^2 - 1 is prime.
%e A127582 a(3)=7 because 7 = 1*2^3 - 1 is prime.
%e A127582 a(4)=31 because 31 = 2*2^4 - 1 is prime.
%p A127582 p:= 2: A[0]:= 2:
%p A127582 for n from 1 to 100 do
%p A127582   if p+1 mod 2^n = 0 then A[n]:= p
%p A127582   else
%p A127582     p:=p+2^(n-1);
%p A127582     while not isprime(p) do p:= p+2^n od:
%p A127582     A[n]:= p;
%p A127582   fi
%p A127582 od:
%p A127582 seq(A[i],i=0..100); # _Robert Israel_, Jan 13 2017
%t A127582 a = {}; Do[k = 0; While[ !PrimeQ[k 2^n + 2^n - 1], k++ ]; AppendTo[a, k 2^n + 2^n - 1], {n, 0, 50}]; a (* _Artur Jasinski_, Jan 19 2007 *)
%Y A127582 Cf. A007522, A127575-A127581, A127583-A127587.
%Y A127582 A087522 is identical except for a(1).
%K A127582 nonn
%O A127582 0,1
%A A127582 _Artur Jasinski_, Jan 19 2007
%E A127582 Edited by _Don Reble_, Jun 11 2007
%E A127582 Further edited by _N. J. A. Sloane_, Jul 03 2008