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.

A090587 Smallest prime with exactly n consecutive zeros in the longest run of zeros in its binary expansion.

This page as a plain text file.
%I A090587 #17 Apr 26 2019 12:31:28
%S A090587 3,2,19,17,67,131,641,257,2053,10243,4099,12289,40961,32771,65539,
%T A090587 65537,262147,786433,4194319,7340033,23068673,50331653,67108879,
%U A090587 436207619,167772161,268435463,268435459,1073741831,1073741827,3221225473,21474836483,68719476767
%N A090587 Smallest prime with exactly n consecutive zeros in the longest run of zeros in its binary expansion.
%C A090587 Except for 2, the first and last binary digits of a prime number are 1.
%C A090587 One may also define a sequence of the smallest prime with its longest run of zeros containing *at least* n zeros in the binary expansion: 2, 2, 17, 17, 67, 131, 257, 257, 2053, 4099,.... - _R. J. Mathar_, Sep 09 2013
%H A090587 Chai Wah Wu, <a href="/A090587/b090587.txt">Table of n, a(n) for n = 0..3313</a>
%F A090587 min{ A000040(k): A090046(k) = n}. - _R. J. Mathar_, Sep 09 2013
%e A090587 a(0) = 3 since 3_d = 11_b. a(1) = 2 since 2_d = 10_b. a(3) = 17 since 17_d = 10001_b. a(6) = 641 since 641_d = 1010000001_b.
%t A090587 a = Table[0, {30}]; NextPrim[n_] := Block[{k = n + 1}, While[ ! PrimeQ[k], k++ ]; k]; p = 2; Do[ m = Length[ Union[ DeleteCases[ Split[ IntegerDigits[p, 2]], 1, 2]][[ -1]]]; If[ a[[m + 1]] == 0, a[[m + 1]] = p]; p = NextPrim[p], {n, 1, 117000000}]
%Y A090587 Cf. A090046, A090593.
%K A090587 nonn,base
%O A090587 0,1
%A A090587 _Robert G. Wilson v_, Dec 03 2003
%E A090587 a(29)-a(31) from _Donovan Johnson_, Sep 10 2013