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!)
A307503 Least prime containing at least n consecutive 1's in its binary representation. 1

%I #22 Apr 26 2019 08:03:18

%S 2,2,3,7,31,31,127,127,1021,3583,4093,6143,8191,8191,81919,131071,

%T 131071,131071,524287,524287,4194301,14680063,16777213,67108859,

%U 536870909,536870909,536870909,536870909,2147483647,2147483647,2147483647,2147483647,21474836479

%N Least prime containing at least n consecutive 1's in its binary representation.

%C For n > 0, a(n) = A000040(m) for the lowest m such that A090000(m) >= n.

%C a(n) = A087522(n) for n = 0 through 7, and in all other cases when a(n) is a base 2 repunit (Mersenne) prime.

%H Chai Wah Wu, <a href="/A307503/b307503.txt">Table of n, a(n) for n = 0..3314</a>

%F a(n) <= A201914(n). - _Rémy Sigrist_, Apr 11 2019

%F a(n) = min_{k>=n} A090593(k). - _Chai Wah Wu_, Apr 26 2019

%e a(0) = 2, the smallest prime containing >= 0 1's.

%e a(1) = 2, the smallest prime containing >= 1 consecutive 1's.

%e a(2) = 3, the smallest prime containing >= 2 consecutive 1's.

%o (PARI) nbo(n)=if (n==0, return (0)); n>>=valuation(n, 2); if(n<2, return(n)); my(e=valuation(n+1, 2)); max(e, nbo(n>>e)); \\ A038374

%o a(n) = my(p=2); while(nbo(p) < n, p=nextprime(p+1)); p; \\ _Michel Marcus_, Apr 14 2019

%Y Cf. A038374, A090000, A087522, A201914.

%Y Cf. A090593 (with exactly n consecutive ones).

%K nonn,base

%O 0,1

%A _John Mason_, Apr 11 2019

%E a(28)-a(32) from _Chai Wah Wu_, Apr 26 2019

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 April 24 02:46 EDT 2024. Contains 371917 sequences. (Running on oeis4.)