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.

A100724 Prime numbers whose binary representations are split into at most 3 runs.

This page as a plain text file.
%I A100724 #13 Feb 16 2025 08:32:55
%S A100724 2,3,5,7,11,13,17,19,23,29,31,47,59,61,67,71,79,97,103,113,127,131,
%T A100724 191,193,199,223,227,239,241,251,257,263,271,383,449,463,479,487,499,
%U A100724 503,509,769,911,967,991,1009,1019,1021,1031,1039,1087,1151,1279,1543,1567
%N A100724 Prime numbers whose binary representations are split into at most 3 runs.
%C A100724 The n-th prime is a term iff A100714(n) <= 3.
%H A100724 Robert Israel, <a href="/A100724/b100724.txt">Table of n, a(n) for n = 1..10000</a>
%H A100724 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Run-LengthEncoding.html">Run-Length Encoding</a>.
%e A100724 a(3)=5 is a term because it is the 3rd prime whose binary representation splits into no more than 3 runs: 5_10 = 101_2.
%p A100724 R:= 2,3: count:= 2:
%p A100724 for d from 2 while count < 100 do
%p A100724   for a from d-1 to 1 by -1 do
%p A100724     for b from 0 to a-1 do
%p A100724       p:= 2*(2^d - 2^a + 2^b)-1;
%p A100724       if isprime(p) then R:= R,p; count:= count+1 fi
%p A100724   od od;
%p A100724   p:= 2^(d+1)-1;
%p A100724   if isprime(p) then R:= R,p; count:= count+1 fi
%p A100724 od:
%p A100724 R; # _Robert Israel_, Oct 30 2024
%t A100724 Select[Table[Prime[k], {k, 1, 50000}], Length[Split[IntegerDigits[ #, 2]]] <= 3 &]
%Y A100724 Includes A000668 and A095078.
%Y A100724 Cf. A100714, A000040.
%K A100724 base,nonn
%O A100724 1,1
%A A100724 Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 11 2004