login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A038699 Smallest prime of form n*2^m-1, m >= 0, or 0 if no such prime exists. 16

%I #19 Nov 21 2013 12:46:44

%S 3,3,2,3,19,5,13,7,17,19,43,11,103,13,29,31,67,17,37,19,41,43,367,23,

%T 199,103,53,223,463,29,61,31,131,67,139,71,73,37,311,79,163,41,5503,

%U 43,89,367,751,47,97,199,101,103,211,53,109,223,113,463,241663,59,487,61

%N Smallest prime of form n*2^m-1, m >= 0, or 0 if no such prime exists.

%H Reinhard Zumkeller, <a href="/A038699/b038699.txt">Table of n, a(n) for n = 1..650</a>

%t getm[n_]:=Module[{m=0},While[!PrimeQ[n 2^m-1],m++];n 2^m-1]; Array[getm,80] (* _Harvey P. Dale_, Apr 24 2011 *)

%o (Haskell)

%o a038699 = until ((== 1) . a010051) ((+ 1) . (* 2)) . (subtract 1)

%o -- _Reinhard Zumkeller_, Mar 05 2012

%Y Primes arising in A040081 (or 0 if no prime exists).

%Y Cf. A040081, A050921.

%Y Cf. A010051, A000079.

%K nonn,easy,nice

%O 1,1

%A _N. J. A. Sloane_, Dec 30 1999

%E More terms from _Henry Bottomley_, Apr 24 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 27 22:08 EDT 2024. Contains 374651 sequences. (Running on oeis4.)