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.
%I A092111 #13 Mar 05 2020 22:52:04 %S A092111 0,0,1,0,1,0,1,1,1,1,1,0,1,2,1,0,1,0,1,1,1,2,1,1,1,2,1,1,1,0,1,1,1,1, %T A092111 1,2,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,0,1,2,1,1,1,1,1,1, %U A092111 1,2,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,1,1,0,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1 %N A092111 a(n) = n+1 minus the greatest number of 1's in the binary representations of primes between 2^n and 2^(n+1). %C A092111 0's occur only at Mersenne prime exponents (A000043) - 1, twos are in A092112, threes do not appear < 504. %C A092111 a(n) <= 2 for n <= 2000. - _Robert Israel_, Mar 05 2020 %H A092111 Robert Israel, <a href="/A092111/b092111.txt">Table of n, a(n) for n = 1..2000</a> %F A092111 a(n) = n+1 - A091937(n). %p A092111 f:= proc(n) local t,j,k; %p A092111 t:= 2^(n+1)-1; %p A092111 if isprime(t) then return 0 fi; %p A092111 for j from 1 to n-1 do if isprime(t-2^j) then return 1 fi od; %p A092111 for j from 1 to n-2 do for k from j+1 to n-1 do %p A092111 if isprime(t-2^j-2^k) then return 2 fi od od; %p A092111 FAIL %p A092111 end proc: %p A092111 map(f, [$1..200]); # _Robert Israel_, Mar 05 2020 %t A092111 Compute the second line of the Mathematica code for A091938, then (Table[n + 1, {n, 105}]) - (Count[ IntegerDigits[ #, 2], 1] & /@ Table[ f[n], {n, 105}]) %Y A092111 Cf. A091938, A092112. %K A092111 nonn %O A092111 1,14 %A A092111 _Robert G. Wilson v_, Feb 20 2004